摘要:
Maximum SubarrayFind the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array[−... 阅读全文
posted @ 2015-09-06 23:55
Sean_le
阅读(93)
评论(0)
推荐(0)
摘要:
Climbing StairsYou are climbing a stair case. It takesnsteps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct way... 阅读全文
posted @ 2015-09-06 23:25
Sean_le
阅读(159)
评论(0)
推荐(0)
摘要:
Single Number IIIGiven an array of numbersnums, in which exactly two elements appear only once and all the other elements appear exactly twice. Find t... 阅读全文
posted @ 2015-09-06 22:27
Sean_le
阅读(129)
评论(0)
推荐(0)
摘要:
Single Number IIGiven an array of integers, every element appearsthreetimes except for one. Find that single one.Note:Your algorithm should have a lin... 阅读全文
posted @ 2015-09-06 20:01
Sean_le
阅读(104)
评论(0)
推荐(0)
摘要:
Search Insert PositionGiven a sorted array and a target value, return the index if the target is found. If not, return the index where it would be if ... 阅读全文
posted @ 2015-09-06 18:22
Sean_le
阅读(112)
评论(0)
推荐(0)
摘要:
Unique Binary Search TreesGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a to... 阅读全文
posted @ 2015-09-06 17:03
Sean_le
阅读(134)
评论(0)
推荐(0)
摘要:
Majority ElementGiven an array of sizen, find the majority element. The majority element is the element that appears more than⌊ n/2 ⌋times.You may ass... 阅读全文
posted @ 2015-09-06 16:08
Sean_le
阅读(201)
评论(0)
推荐(0)
摘要:
N-Queens IIFollow up for N-Queens problem.Now, instead outputting board configurations, return the total number of distinct solutions.和上题N-Queens几乎一样,... 阅读全文
posted @ 2015-09-06 00:00
Sean_le
阅读(126)
评论(0)
推荐(0)

浙公网安备 33010602011771号