题目描述:对于一个二叉查找树,设计一个迭代器,每次调用会返回下一个最小值题目分析:没什么好说的二叉树的先序遍历代码: 1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * Tre...
分类:
其他好文 时间:
2015-01-10 17:55:11
阅读次数:
203
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
/** * 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
/** * 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
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
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
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
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
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
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