Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:
其他好文 时间:
2014-12-03 21:09:03
阅读次数:
119
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-12-03 19:03:24
阅读次数:
169
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 and sum
= 22,
5
/ \...
分类:
其他好文 时间:
2014-12-01 22:39:17
阅读次数:
186
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.
For example:
Given the below binary tree and sum...
分类:
其他好文 时间:
2014-12-01 22:37:27
阅读次数:
146
Path Sum IIGiven 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 tr...
分类:
其他好文 时间:
2014-11-29 17:29:14
阅读次数:
184
Path SumGiven 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 give...
分类:
其他好文 时间:
2014-11-29 15:49:23
阅读次数:
135
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-11-29 13:03:14
阅读次数:
180
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-11-29 11:37:32
阅读次数:
131
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root).
这个简单的问题可以这样解决:利用LeetCode[Tree]: Binary Tree Level...
分类:
其他好文 时间:
2014-11-28 10:15:15
阅读次数:
227
恢复二叉树 1 #include 2 #include 3 4 using namespace std; 5 6 struct node 7 { 8 char c; 9 struct node *lch,*rch;10 };11 12 int count_leaf(node*...
分类:
编程语言 时间:
2014-11-27 22:01:49
阅读次数:
287