码迷,mamicode.com
首页 >  
搜索关键字:treenode    ( 1958个结果
Binary Search Tree Iterator 173
题目描述:对于一个二叉查找树,设计一个迭代器,每次调用会返回下一个最小值题目分析:没什么好说的二叉树的先序遍历代码: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * Tre...
分类:其他好文   时间:2015-01-10 17:55:11    阅读次数:203
[LeetCode]156 Binary Tree Upside Down
https://oj.leetcode.com/problems/binary-tree-upside-down/http://blog.csdn.net/xudli/article/details/42362441/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution{ publicT..
分类:其他好文   时间:2015-01-09 19:29:33    阅读次数:169
Maximum Depth of Binary Tree
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; ...
分类:其他好文   时间:2015-01-09 14:10:52    阅读次数:101
Same Tree
/** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; ...
分类:其他好文   时间:2015-01-09 14:06:02    阅读次数:134
[LeetCode]144 Binary Tree Preorder Traversal
https://oj.leetcode.com/problems/binary-tree-preorder-traversal/http://blog.csdn.net/linhuanmars/article/details/21428647/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolu..
分类:其他好文   时间:2015-01-09 01:52:30    阅读次数:274
[LeetCode]124 Binary Tree Maximum Path Sum
https://oj.leetcode.com/problems/binary-tree-maximum-path-sum/http://blog.csdn.net/linhuanmars/article/details/22969069/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSoluti..
分类:其他好文   时间:2015-01-07 19:14:02    阅读次数:158
[LeetCode]129 Sum Root to Leaf Numbers
https://oj.leetcode.com/problems/sum-root-to-leaf-numbers/http://blog.csdn.net/linhuanmars/article/details/22913699/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclassSolution{ ..
分类:其他好文   时间:2015-01-07 19:01:24    阅读次数:112
[LeetCode]114 Flatten Binary Tree to Linked List
https://oj.leetcode.com/problems/flatten-binary-tree-to-linked-list/http://blog.csdn.net/linhuanmars/article/details/23717703/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){val=x;} *} */ publicclass..
分类:其他好文   时间:2015-01-06 18:20:38    阅读次数:147
[LeetCode]105 Construct Binary Tree from Preorder and Inorder Traversal
https://oj.leetcode.com/problems/construct-binary-tree-from-preorder-and-inorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24389549/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){va..
分类:其他好文   时间:2015-01-06 15:55:10    阅读次数:101
[LeetCode]106 Construct Binary Tree from Inorder and Postorder Traversal
https://oj.leetcode.com/problems/construct-binary-tree-from-inorder-and-postorder-traversal/http://blog.csdn.net/linhuanmars/article/details/24390157/** *Definitionforbinarytree *publicclassTreeNode{ *intval; *TreeNodeleft; *TreeNoderight; *TreeNode(intx){v..
分类:其他好文   时间:2015-01-06 15:54:59    阅读次数:138
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!