Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent
a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find the tota...
分类:
其他好文 时间:
2015-01-15 09:26:49
阅读次数:
117
题目:
Given a binary tree containing digits from 0-9 only, each root-to-leaf path could represent
a number.
An example is the root-to-leaf path 1->2->3 which represents the number 123.
Find...
分类:
编程语言 时间:
2015-01-14 22:59:16
阅读次数:
431
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
...
分类:
其他好文 时间:
2015-01-14 16:58:45
阅读次数:
167
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
/ ...
分类:
其他好文 时间:
2015-01-14 16:55:08
阅读次数:
202
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).
For example:
Given binary tree {3,9,20,#,#,15,7},
...
分类:
其他好文 时间:
2015-01-14 15:36:13
阅读次数:
127
Given a binary tree, find its maximum depth.
The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node.
/**
* Definition for binary tree
*...
分类:
其他好文 时间:
2015-01-14 12:49:54
阅读次数:
131
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...
分类:
其他好文 时间:
2015-01-14 00:43:38
阅读次数:
166
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...
分类:
其他好文 时间:
2015-01-13 19:55:05
阅读次数:
174
1、树的定义树(Tree):n(n>=0)个结点构成的有限集合子树是不相交的。除了根节点外,每个结点有且仅有一个父结点。一棵N个结点的树有N-1条边。2、树的一些基本术语(1)结点的度(Degree):结点的子树个数(2)树的度:树的所有结点中最大的度数(3)叶结点(Leaf):度为0的结点(4)父...
分类:
其他好文 时间:
2015-01-13 14:18:31
阅读次数:
104
题目:
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
/...
分类:
编程语言 时间:
2015-01-12 19:24:15
阅读次数:
170