码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
[LeetCode] 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 the tree. 1 /** 2 * De....
分类:其他好文   时间:2015-01-17 20:47:15    阅读次数:211
【leetcode】Binary Tree Zigzag Level Order Traversal (middle)
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
[LeetCode] 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 do not exist in the tree. 1 /** 2 * Def....
分类:其他好文   时间:2015-01-17 16:29:31    阅读次数:160
[LeetCode] Binary Tree Level Order Traversal II
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
[C++]LeetCode: 101 Binary Tree Zigzag Level Order Traversal
题目: 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
Binary Tree Inorder Traversal
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
Binary Tree Preorder Traversal
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
LeetCode--Binary Tree Preorder Traversal
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
LeetCode--Binary Tree Postorder Traversal
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!