摘要: 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 阅读全文
posted @ 2017-08-02 14:02 Review->Improve 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-08-01 15:36 Review->Improve 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-08-01 07:03 Review->Improve 阅读(801) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-08-01 00:48 Review->Improve 阅读(136) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-07-22 05:17 Review->Improve 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-07-22 01:03 Review->Improve 阅读(154) 评论(0) 推荐(0) 编辑
摘要: 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. 阅读全文
posted @ 2017-07-21 14:36 Review->Improve 阅读(332) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-07-21 14:15 Review->Improve 阅读(845) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2017-07-21 11:14 Review->Improve 阅读(558) 评论(0) 推荐(0) 编辑
摘要: Given an unsorted integer array, find the first missing positive integer. Given an unsorted integer array, find the first missing positive integer. Gi 阅读全文
posted @ 2017-07-21 07:05 Review->Improve 阅读(434) 评论(8) 推荐(1) 编辑