摘要:
Given two strings, find the longest common subsequence (LCS). Your code should return the length of LCS. Given two strings, find the longest common su 阅读全文
摘要:
Given a string s and a dictionary of words dict, determine if s can be break into a space-separated sequence of one or more dictionary words. Example 阅读全文
摘要:
A Maze is given as N*N binary matrix of blocks where source block is the upper left most block i.e., maze[0][0] and destination block is lower rightmo 阅读全文
摘要:
Give a number n, check if it is a fibonacci number. Solution 1. Generate a sequence of fibonacci number until we have a fibonacci number that is eithe 阅读全文
摘要:
Given an unsorted array, find the largest pair sum. Solution 1. O(n*logn) runtime, using sorting Solution 2. O(n) runtime, using heapify (max priority 阅读全文
摘要:
Given a string, reverse it without using any temporary variables. This problem is a variation of the problem swapping two integers without using any t 阅读全文
摘要:
Given an array nums containing n + 1 integers where each integer is between 1 and n (inclusive), prove that at least one duplicate number must exist. 阅读全文
摘要:
Giving a string with number from 1 to n in random order, but miss 1 number.Find that number. You can assume n <= 30 Giving a string with number from 1 阅读全文
摘要:
Given an array contains N numbers of 0 .. N, find which number doesn't exist in the array. Given an array contains N numbers of 0 .. N, find which num 阅读全文
摘要:
Given an unsorted integer array, find the first missing positive integer. Given an unsorted integer array, find the first missing positive integer. Gi 阅读全文