Given a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum.Fo...
分类:
其他好文 时间:
2014-08-16 22:21:41
阅读次数:
235
Happy Reversal
Elfness is studying in an operation "NOT".
For a binary number A, if we do operation "NOT A", after that, all digits of A will be reversed. (e.g. A=1001101, after operation "NOT A...
分类:
移动开发 时间:
2014-08-16 21:10:31
阅读次数:
321
Binary Apple TreeTime Limit: 1000msMemory Limit: 16384KBThis problem will be judged onUral. Original ID:101864-bit integer IO format:%lld Java class n...
分类:
移动开发 时间:
2014-08-16 16:17:20
阅读次数:
256
Given a binary tree, flatten it to a linked list in-place....
分类:
其他好文 时间:
2014-08-16 12:39:00
阅读次数:
136
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the sequence of ...
分类:
其他好文 时间:
2014-08-16 12:37:20
阅读次数:
219
Convert Sorted List to Binary Search TreeGiven a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST....
分类:
其他好文 时间:
2014-08-16 12:19:20
阅读次数:
227
Given a binary tree, return the inorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,3,2].
Note: Recursive solutio...
分类:
其他好文 时间:
2014-08-16 11:15:00
阅读次数:
227
今天的异常很有意思,叫做android.view.InflateException: Binary XML file line #95: Error inflating class(out of memory) 。
其实是因为out of memory,导致 xml是不可能被充气成功,因此activity的onCreate方法中,
setContentView(R.layout.***)也就不...
分类:
移动开发 时间:
2014-08-16 01:04:09
阅读次数:
313
Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al...
分类:
其他好文 时间:
2014-08-16 00:59:49
阅读次数:
179
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...
分类:
其他好文 时间:
2014-08-16 00:59:29
阅读次数:
178