上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页

2014年12月29日

摘要: Largest Rectangle in Histogram Given n non-negative integers representing the histogram's bar height where the width of each bar is 1, find the area o 阅读全文
posted @ 2014-12-29 16:38 Yu's Garden 阅读(2584) 评论(2) 推荐(1) 编辑

2014年12月28日

摘要: Edit DistanceGiven two wordsword1andword2, find the minimum number of steps required to convertword1toword2. (each operation is counted as 1 step.)You... 阅读全文
posted @ 2014-12-28 18:48 Yu's Garden 阅读(2478) 评论(1) 推荐(0) 编辑

2014年12月27日

摘要: Interleaving StringGiven s1, s2, s3, find whether s3 is formed by the interleaving of s1 and s2.For example,Given:s1 = "aabcc",s2 = "dbbca",When s3 = ... 阅读全文
posted @ 2014-12-27 21:23 Yu's Garden 阅读(746) 评论(0) 推荐(0) 编辑
摘要: Scramble StringGiven a strings1, we may represent it as a binary tree by partitioning it to two non-empty substrings recursively.Below is one possible... 阅读全文
posted @ 2014-12-27 20:38 Yu's Garden 阅读(5084) 评论(0) 推荐(1) 编辑
摘要: Longest Palindromic Substring-- HARD 级别Question SolutionGiven a string S, find the longest palindromic substring in S. You may assume that the maximum... 阅读全文
posted @ 2014-12-27 19:36 Yu's Garden 阅读(3086) 评论(0) 推荐(1) 编辑
摘要: Longest Substring Without Repeating CharactersGiven a string, find the length of the longest substring without repeating characters. For example, the ... 阅读全文
posted @ 2014-12-27 18:41 Yu's Garden 阅读(594) 评论(0) 推荐(0) 编辑
摘要: Remove Duplicates from Sorted List IIGiven a sorted linked list, delete all nodes that have duplicate numbers, leaving onlydistinctnumbers from the or... 阅读全文
posted @ 2014-12-27 10:05 Yu's Garden 阅读(597) 评论(0) 推荐(0) 编辑

2014年12月26日

摘要: Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / ... 阅读全文
posted @ 2014-12-26 13:36 Yu's Garden 阅读(957) 评论(0) 推荐(1) 编辑

2014年12月23日

摘要: Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.SOLUTION 1:... 阅读全文
posted @ 2014-12-23 12:30 Yu's Garden 阅读(366) 评论(0) 推荐(0) 编辑

2014年12月22日

摘要: Gas StationThere are N gas stations along a circular route, where the amount of gas at station i is gas[i].You have a car with an unlimited gas tank a... 阅读全文
posted @ 2014-12-22 23:18 Yu's Garden 阅读(2899) 评论(2) 推荐(2) 编辑
上一页 1 2 3 4 5 6 7 8 9 ··· 17 下一页

导航