码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[leetcode] Construct Binary Tree from Preorder and Inorder Traversal
Construct Binary Tree from Preorder and Inorder TraversalGiven preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume...
分类:其他好文   时间:2015-01-09 18:46:57    阅读次数:151
[leetcode] Construct Binary Tree from Inorder and Postorder Traversal
Construct Binary Tree from Inorder and Postorder TraversalGiven inorder and postorder traversal of a tree, construct the binary tree.Note:You may assu...
分类:其他好文   时间:2015-01-09 15:29:53    阅读次数:115
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
[C++]LeetCode: 80 Find Minimum in Rotated Sorted Array
题目: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2). Find the minimum element. You may assume no duplicate exi...
分类:编程语言   时间:2015-01-09 12:42:03    阅读次数:253
[LeetCode#95]Unique Binary Search Trees II
The problem:Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.My analysis:The problem is easy at some extent,...
分类:其他好文   时间:2015-01-09 12:15:07    阅读次数:108
JAVA调用mysql数据操作时出现错误:impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT.'
Error executing row event: 'Cannot execute statement: impossible to write to binary log since statement is in row format and BINLOG_FORMAT = STATEMENT...
分类:数据库   时间:2015-01-09 12:11:21    阅读次数:707
[Leetcode][JAVA] 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-09 08:04:12    阅读次数:289
[LeetCode#99]Recover Binary Search Tree
The problem:Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(...
分类:其他好文   时间:2015-01-09 06:54:36    阅读次数:132
[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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!