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
Sum Root to Leaf NumbersGiven a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-l...
分类:
其他好文 时间:
2014-08-16 00:59:09
阅读次数:
197
Unique Binary Search Trees IIGivenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your pr...
分类:
其他好文 时间:
2014-08-15 23:44:29
阅读次数:
280
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.
Recover the tree without changing its structure.
Note:
A solution using O(n)
space is pretty s...
分类:
其他好文 时间:
2014-08-15 19:39:39
阅读次数:
222
[BestCoder Round #5]冠军的奖励是小米3手机一部
恭喜福州大学杨楠获得[BestCoder Round #4]冠军(iPad Mini一部)
《BestCoder用户手册》下载
Defence of the Trees
Time Limit: 20000/10000 MS (Java/Others) Memory Limit: 65536/65536 K (Ja...
分类:
其他好文 时间:
2014-08-15 14:45:50
阅读次数:
314
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.参考“Largest Rectangle in Histogram...
分类:
其他好文 时间:
2014-08-15 12:45:58
阅读次数:
162
Problem DUndraw the Trees Input:StandardInputOutput: Standard Output Time Limit: 2 SecondsProfessor Homer has been reported missing. We suspect thathi...
分类:
其他好文 时间:
2014-08-15 12:20:48
阅读次数:
315