Given inorder and postorder traversal of a tree, construct the binary tree.Note:
You may assume that duplicates do not exist in the tree....
分类:
其他好文 时间:
2015-05-01 20:00:19
阅读次数:
188
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-04-26 19:34:19
阅读次数:
140
https://leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/Given inorder and postorder traversal of a tree, construct th...
分类:
其他好文 时间:
2015-04-26 15:00:15
阅读次数:
116
problem:
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in the tree.
Hide Tags
Tree Array Depth-first...
分类:
其他好文 时间:
2015-04-23 09:35:14
阅读次数:
157
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-04-18 07:33:53
阅读次数:
118
跟另一道题一样,不多说了public class Solution { public TreeNode buildTree(int[] inorder, int[] postorder) { // post就是pre的近似倒过来 if(inorder==null||...
分类:
其他好文 时间:
2015-04-18 06:26:50
阅读次数:
175
题目链接:Construct
Binary Tree from Inorder and Postorder Traversal
Given inorder and postorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates do not exist in th...
分类:
其他好文 时间:
2015-04-17 18:15:57
阅读次数:
159
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1].No...
分类:
其他好文 时间:
2015-04-14 00:30:05
阅读次数:
163
常见题了,分治思想,有一个结论划分后,将序列划分为更小的子集,继续应用该结论。图简单,直接递归了,之前看过非递归的写法。。。忘了Impl: 1 #include 2 #include 3 4 using namespace std; 5 6 void postOrder(string str...
分类:
其他好文 时间:
2015-04-13 12:26:41
阅读次数:
255
一:LeetCode 105 Construct
Binary Tree from Preorder and Inorder Traversal
题目:
Given preorder and inorder traversal of a tree, construct the binary tree.
Note:
You may assume that duplicates d...
分类:
其他好文 时间:
2015-04-12 14:50:20
阅读次数:
117