public class Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { if (inorder == null || postorder == null || inorder.leng...
分类:
其他好文 时间:
2015-05-19 10:11:11
阅读次数:
113
public class Solution { public TreeNode buildTree(int[] preorder, int[] inorder) { if (preorder == null || inorder == null || preorder.lengt...
分类:
其他好文 时间:
2015-05-19 10:09:22
阅读次数:
136
原题链接:http://acm.hdu.edu.cn/showproblem.php?pid=1622小白书上的题。。。 1 #include 2 #include 3 #include 4 #include 5 #include 6 #include 7 using std::queue; 8 u...
分类:
其他好文 时间:
2015-05-18 22:23:05
阅读次数:
104
Title:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, ...
分类:
其他好文 时间:
2015-05-18 16:35:54
阅读次数:
108
https://leetcode.com/problems/binary-tree-postorder-traversal/Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given...
分类:
其他好文 时间:
2015-05-18 12:49:08
阅读次数:
98
题目: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-05-18 12:45:37
阅读次数:
100
题目:Given a binary tree, find the maximum path sum.The path may start and end at any node in the tree.For example:Given the below binary tree, 1 ...
分类:
其他好文 时间:
2015-05-18 12:41:10
阅读次数:
113
Given a binary tree, find the maximum path sum.
The path may start and end at any node in the tree.
For example:
Given the below binary tree,
1
/ 2 3
Return 6.
...
分类:
其他好文 时间:
2015-05-18 09:18:17
阅读次数:
102
题目描述
The gray code is a binary numeral system where two successive values differ in only one bit.
Given a non-negative integer n representing the total number of bits in the code, print the se...
分类:
其他好文 时间:
2015-05-18 09:12:13
阅读次数:
118
题目: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 andsu...
分类:
其他好文 时间:
2015-05-17 23:29:44
阅读次数:
153