Given inorder and postorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree. 1 /** 2 * De....
分类:
其他好文 时间:
2015-01-17 20:47:15
阅读次数:
211
Given a binary tree, return thezigzag level ordertraversal of its nodes' values. (ie, from left to right, then right to left for the next level and al...
分类:
其他好文 时间:
2015-01-17 17:58:07
阅读次数:
199
Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree. 1 /** 2 * Def....
分类:
其他好文 时间:
2015-01-17 16:29:31
阅读次数:
160
iven 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 exam...
分类:
其他好文 时间:
2015-01-16 22:17:55
阅读次数:
292
题目:
Given a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to right, then right to left for the next level and alternate between).
For example:
Given ...
分类:
编程语言 时间:
2015-01-16 16:46:28
阅读次数:
179
https://oj.leetcode.com/problems/binary-tree-inorder-traversal/Given a binary tree, return theinordertraversal of its nodes' values.For example:Given ...
分类:
其他好文 时间:
2015-01-15 21:40:38
阅读次数:
98
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/Given a binary tree, return thepreordertraversal of its nodes' values.For example:Give...
分类:
其他好文 时间:
2015-01-15 21:33:47
阅读次数:
138
Given a binary tree, return the preorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [1,2,3].
Note: Recursive soluti...
分类:
其他好文 时间:
2015-01-15 13:04:35
阅读次数:
160
Given a binary tree, return the postorder traversal of its nodes' values.
For example:
Given binary tree {1,#,2,3},
1
2
/
3
return [3,2,1].
Note: Recursive solut...
分类:
其他好文 时间:
2015-01-15 13:00:56
阅读次数:
141
二叉树的前序,中序,后序,层次遍历/** binary tree traversal methods */package dataStructures;public class BinaryTreeTraversal { /** visit method that prints the ele...
分类:
其他好文 时间:
2015-01-15 10:37:52
阅读次数:
230