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-10-03 18:16:44
阅读次数:
200
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:
其他好文 时间:
2015-10-03 11:50:06
阅读次数:
131
(referrence: ProgramCreek)The key to solve inorder traversal of binary tree includes the following:The order of "inorder" is: left child -> parent -> ...
分类:
其他好文 时间:
2015-09-29 09:51:25
阅读次数:
108
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { v...
分类:
其他好文 时间:
2015-09-25 13:19:53
阅读次数:
104
Problem Description:Given a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has no in...
分类:
其他好文 时间:
2015-09-22 18:28:52
阅读次数:
171
Inorder Successor in BSTGiven a binary search tree and a node in it, find the in-order successor of that node in the BST.Note: If the given node has n...
分类:
其他好文 时间:
2015-09-22 16:04:13
阅读次数:
144
LeetCode -- Binary Tree Inorder Traversal
中序遍历...
分类:
其他好文 时间:
2015-09-19 16:52:18
阅读次数:
153
Binary Tree Inorder TraversalGiven a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:
编程语言 时间:
2015-09-15 01:31:31
阅读次数:
154
Sept. 13, 2015Spent more than a few hours to work on the leetcode problem, and my favorite blogs about this problems:1.http://siddontang.gitbooks.io/l...
分类:
其他好文 时间:
2015-09-14 07:02:38
阅读次数:
138
Given inorder and postorder traversal of a tree, construct the binary tree.Note: 1 /** 2 * Definition for a binary tree node. 3 * struct TreeNode ...
分类:
其他好文 时间:
2015-09-06 17:44:09
阅读次数:
146