码迷,mamicode.com
首页 >  
搜索关键字:traversal    ( 1649个结果
[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}, return [3,2,1].Note: Recursive solution is trivial, could you do it iteratively?...
分类:其他好文   时间:2015-02-24 07:02:03    阅读次数:180
[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}, return [3,2,1].Note: Recursive solution is trivial, could you do it iteratively?递归...
分类:其他好文   时间:2015-02-24 01:53:20    阅读次数:192
[LeetCode] Binary Tree Inorder Traversal 二叉树的中序遍历
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-02-22 06:46:02    阅读次数:162
[LeetCode] Binary Tree Zigzag Level Order Traversal 二叉树的之字形层序遍历
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-02-21 15:26:40    阅读次数:185
[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.这道题要求用先序和中序遍历来建...
分类:其他好文   时间:2015-02-20 14:08:33    阅读次数:169
[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.这道题要求从中序和后序遍历的...
分类:其他好文   时间:2015-02-19 18:37:40    阅读次数:221
leetcode 106. 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.[Solution]后序定根...
分类:其他好文   时间:2015-02-18 11:50:07    阅读次数:129
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 do not exist in the tree.[Solution]先序定根,...
分类:其他好文   时间:2015-02-18 11:47:49    阅读次数:151
leetcode 107. Binary Tree Level Order Traversal II
Given 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 exa...
分类:其他好文   时间:2015-02-17 19:53:57    阅读次数:197
[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. 这道题要求根据二叉树的前序遍历序列和中序遍历序列构建二叉树。 举个例子: 前序序列:A B D E F C...
分类:其他好文   时间:2015-02-14 13:48:00    阅读次数:145
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!