摘要: Search in Rotated Sorted Array IIFollow up for "Search in Rotated Sorted Array":What ifduplicatesare allowed?Would this affect the run-time complexity... 阅读全文
posted @ 2014-12-06 19:10 陆草纯 阅读(395) 评论(0) 推荐(0) 编辑
摘要: Search in Rotated Sorted ArraySuppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e.,0 1 2 4 5 6 7might become4 5 6 7 0 1 2).... 阅读全文
posted @ 2014-12-06 18:38 陆草纯 阅读(2076) 评论(0) 推荐(0) 编辑
摘要: Remove Duplicates from Sorted ListGiven a sorted linked list, delete all duplicates such that each element appear onlyonce.For example,Given1->1->2, r... 阅读全文
posted @ 2014-12-06 16:39 陆草纯 阅读(141) 评论(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-06 16:26 陆草纯 阅读(216) 评论(0) 推荐(0) 编辑
摘要: Maximal RectangleGiven a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.如果用DP来做,判断(begin... 阅读全文
posted @ 2014-12-06 15:56 陆草纯 阅读(520) 评论(0) 推荐(0) 编辑
摘要: Largest Rectangle in HistogramGivennnon-negative integers representing the histogram's bar height where the width of each bar is 1, find the area of l... 阅读全文
posted @ 2014-12-06 15:24 陆草纯 阅读(8397) 评论(1) 推荐(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-06 11:11 陆草纯 阅读(1786) 评论(1) 推荐(0) 编辑