Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.For example:Given the below binary tree andsum =...
分类:
其他好文 时间:
2014-10-22 07:36:22
阅读次数:
218
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:
其他好文 时间:
2014-10-21 22:48:09
阅读次数:
266
Solution ID: fb83262Last Modified: May 17, 2013Product Category: Intellectual PropertyProduct Area: Comm, Interface & PeripheralsProduct Sub-area: IP ...
Populating Next Right Pointers in Each Node IIFollow up for problem "Populating Next Right Pointers in Each Node".What if the given tree could be any ...
分类:
其他好文 时间:
2014-10-21 21:09:42
阅读次数:
267
描述 Description 鼓的主要元件是M个围成一圈的传感器。每个传 感器都有开和关两种工作状态,分别用1和0表示。显然,从不同的位置出发沿顺时针方向连续检查K个传感器可以得到M个长度为K的01串。Vani知道这M 个01串应该是互不相同的。而且鼓的设计很精密,M会取到可能的最大值。现在Van....
分类:
其他好文 时间:
2014-10-21 17:31:31
阅读次数:
159
[leetcode]Combination Sum II...
分类:
其他好文 时间:
2014-10-21 12:20:29
阅读次数:
237
http://acm.hdu.edu.cn/showproblem.php?pid=4509题目大意: 中文意义,应该能懂。解题思路: 因为题目给的时间是一天24小时,而且还有分钟。为了解题方便,我们将小时换成分钟,那么一天24小时,总共有1440分钟。顾我就可以把一天里的任意HH:MM时间换成.....
分类:
其他好文 时间:
2014-10-20 23:10:33
阅读次数:
234
杨辉三角,分别求前n行和第n行。
【求杨辉三角前n行】
Given numRows, generate the first numRows of Pascal's triangle.
For example, given numRows = 5,
Return
[
[1],
[1,1],
[1,2,1],
[1,3,3,1],
[1,4,6,4,...
分类:
其他好文 时间:
2014-10-20 19:32:35
阅读次数:
190
Word Break IIGiven a string s and a dictionary of words dict, add spaces in s toconstruct a sentence where each word is a valid dictionaryword.Return ...
分类:
其他好文 时间:
2014-10-20 17:10:28
阅读次数:
466