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...
分类:
其他好文 时间:
2015-07-22 20:20:26
阅读次数:
129
原体如下:
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 tr...
分类:
其他好文 时间:
2015-07-22 18:45:58
阅读次数:
87
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...
分类:
其他好文 时间:
2015-07-21 23:44:58
阅读次数:
124
Problem Definition: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 equa...
分类:
其他好文 时间:
2015-07-21 21:55:17
阅读次数:
105
题目:
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...
分类:
编程语言 时间:
2015-07-21 12:59:51
阅读次数:
120
题目:
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-07-21 12:54:55
阅读次数:
127
题目:
Given a binary tree, find its minimum depth.
The minimum depth is the number of nodes along the shortest path from the root node down to the nearest leaf node.
题意:
给定一棵二叉树,返回它的最小高度。
最小高...
分类:
编程语言 时间:
2015-07-21 10:39:59
阅读次数:
132
129 Sum Root to Leaf Numbers基本就是递归了class Solution: def __init__(self): self.ans = 0 def sumNumbers(self, root): self.help(root, ""...
分类:
其他好文 时间:
2015-07-20 15:46:40
阅读次数:
87
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...
分类:
其他好文 时间:
2015-07-19 20:03:00
阅读次数:
108
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-07-17 18:56:10
阅读次数:
108