摘要:
Find Peak Element:A peak element is an element that is greater than its neighbors.Given an input array where num[i] ≠ num[i+1], find a peak element and return its index.The array may contain multiple ... 阅读全文
posted @ 2016-01-26 20:33
Lewisr
阅读(122)
评论(0)
推荐(0)
摘要:
Find Minimum in Rotated Sorted Array:Suppose a sorted array is rotated at some pivot unknown to you beforehand.(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).Find the minimum element. You may assume... 阅读全文
posted @ 2016-01-26 20:26
Lewisr
阅读(128)
评论(0)
推荐(0)
摘要:
Sort Colors:Given an array with n objects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the order red, white and blue.Here, we will use the i... 阅读全文
posted @ 2016-01-26 20:11
Lewisr
阅读(97)
评论(0)
推荐(0)
摘要:
Container With Most Water:Given n non-negative integers a1, a2, ..., an, where each represents a point at coordinate (i, ai). n vertical lines are drawn such that the two endpoints of line i is at (i,... 阅读全文
posted @ 2016-01-26 19:58
Lewisr
阅读(119)
评论(0)
推荐(0)
摘要:
3Sum Closest:Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would... 阅读全文
posted @ 2016-01-26 19:46
Lewisr
阅读(1221)
评论(0)
推荐(0)

浙公网安备 33010602011771号