2014年4月15日

Search for a Range

摘要: Given a sorted array of integers, find the starting and ending position of a given target value.Your algorithm's runtime complexity must be in the ord... 阅读全文

posted @ 2014-04-15 22:24 pengyu2003 阅读(103) 评论(0) 推荐(0) 编辑

Container With Most Water

摘要: Givennnon-negative integersa1,a2, ...,an, where each represents a point at coordinate (i,ai).nvertical lines are drawn such that the two endpoints of ... 阅读全文

posted @ 2014-04-15 16:57 pengyu2003 阅读(151) 评论(0) 推荐(0) 编辑

Palindrome Partitioning

摘要: Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.For example, giv... 阅读全文

posted @ 2014-04-15 16:48 pengyu2003 阅读(111) 评论(0) 推荐(0) 编辑

Longest Consecutive Sequence

摘要: Given an unsorted array of integers, find the length of the longest consecutive elements sequence.For example,Given[100, 4, 200, 1, 3, 2],The longest ... 阅读全文

posted @ 2014-04-15 16:01 pengyu2003 阅读(171) 评论(0) 推荐(0) 编辑

导航