Problem:Given a binary tree where all the right nodes are either leaf nodes with a sibling (a left node that shares the same parent node) or empty, fl...
分类:
其他好文 时间:
2015-09-15 06:56:07
阅读次数:
147
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-09-09 21:22:44
阅读次数:
168
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...
分类:
其他好文 时间:
2015-09-06 21:21:23
阅读次数:
131
题目:
Given a binary tree, return all root-to-leaf paths.
For example, given the following binary tree:
1
/ 2 3
5
All root-to-leaf paths are:
["1->2->5", "1->3"]...
分类:
其他好文 时间:
2015-08-31 15:16:29
阅读次数:
161
题目:Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["...
分类:
其他好文 时间:
2015-08-31 06:27:15
阅读次数:
171
Given a binary tree, return all root-to-leaf paths.For example, given the following binary tree: 1 / \2 3 \ 5All root-to-leaf paths are:["1->...
分类:
其他好文 时间:
2015-08-30 19:23:21
阅读次数:
128
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-08-30 12:39:29
阅读次数:
145
Given a binary tree, return all root-to-leaf paths.
For example, given the following binary tree:
1
/ 2 3
5
All root-to-leaf paths are:
["1->2->5", "1->3"]
递归的方法:
publi...
分类:
其他好文 时间:
2015-08-28 17:37:44
阅读次数:
168
题目: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 ...
分类:
其他好文 时间:
2015-08-28 12:45:15
阅读次数:
125
题目链接:https://leetcode.com/submissions/detail/37771540/
题目:
Given a binary tree, return all root-to-leaf paths.
For example, given the following binary tree:
1
/ 2 3
5
...
分类:
其他好文 时间:
2015-08-27 16:45:00
阅读次数:
133