码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
leetcode 94. 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].inor...
分类:其他好文   时间:2015-01-18 11:45:40    阅读次数:173
leetcode 144. Binary Tree Preorder Traversal
Given a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,2,3].Not...
分类:其他好文   时间:2015-01-18 11:45:24    阅读次数:189
[LeetCode] Binary Search Tree Iterator 二叉搜索树迭代器
Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Callingnext()will return the next...
分类:其他好文   时间:2015-01-18 09:17:43    阅读次数:146
[LeetCode] Flatten Binary Tree to Linked List
Given a binary tree, flatten it to a linked list in-place.For example,Given 1 / \ 2 5 / \ \ 3 4 6The flattened t...
分类:其他好文   时间:2015-01-17 22:04:05    阅读次数:178
[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 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-01-17 13:51:25    阅读次数:136
[LeetCode#89]Gray Code
The problem:The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the ...
分类:其他好文   时间:2015-01-17 06:19:58    阅读次数:177
[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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!