摘要:
Find the contiguous subarray within an array (containing at least one number) which has the largest product.For example, given the array[2,3,-2,4],the... 阅读全文
posted @ 2015-10-01 23:05
amazingzoe
阅读(134)
评论(0)
推荐(0)
摘要:
Given an arraynumscontainingn+ 1 integers where each integer is between 1 andn(inclusive), prove that at least one duplicate number must exist. Assume... 阅读全文
posted @ 2015-10-01 08:42
amazingzoe
阅读(129)
评论(0)
推荐(0)
摘要:
Find all possible combinations ofknumbers that add up to a numbern, given that only numbers from 1 to 9 can be used and each combination should be a u... 阅读全文
posted @ 2015-10-01 08:30
amazingzoe
阅读(110)
评论(0)
推荐(0)
摘要:
Given a collection of candidate numbers (C) and a target number (T), find all unique combinations inCwhere the candidate numbers sums toT.Each number ... 阅读全文
posted @ 2015-10-01 08:11
amazingzoe
阅读(130)
评论(0)
推荐(0)
摘要:
Find thekth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.For exampl... 阅读全文
posted @ 2015-10-01 06:34
amazingzoe
阅读(150)
评论(0)
推荐(0)
摘要:
Given an Iterator class interface with methods:next()andhasNext(), design and implement a PeekingIterator that support thepeek()operation -- it essent... 阅读全文
posted @ 2015-10-01 06:01
amazingzoe
阅读(124)
评论(0)
推荐(0)
摘要:
Given an array of strings, group anagrams together.For example, given:["eat", "tea", "tan", "ate", "nat", "bat"],Return: 1 class Solution { 2 public: ... 阅读全文
posted @ 2015-10-01 01:54
amazingzoe
阅读(139)
评论(0)
推荐(0)
浙公网安备 33010602011771号