码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Minimum Depth of Binary Tree
Minimum Depth of Binary Tree...
分类:其他好文   时间:2015-01-09 21:02:38    阅读次数:175
Balanced Binary Tree
Balanced Binary Tree...
分类:其他好文   时间:2015-01-09 21:01:27    阅读次数:180
算法导论学习-binary search tree
1. 概念:Binary-search tree(BST)是一颗二叉树,每个树上的节点都有parent.left.key。但找到x的parent就结束了吗,还没有,就像TREE-MINIMUM函数一样,我们需要逐层查找,当找到符合条件的parent后,我们递归的继续检查parent节点有没有pare...
分类:编程语言   时间:2015-01-09 20:48:25    阅读次数:219
[LeetCode]162 Find Peak Element
https://oj.leetcode.com/problemset/algorithms/http://siddontang.gitbooks.io/leetcode-solution/content/array/find_peak_element.htmlpublicclassSolution{ publicintfindPeakElement(int[]num){ //SolutionA: returnfindPeakElement_Binary(num); //SolutionB: //retur..
分类:其他好文   时间:2015-01-09 19:31:41    阅读次数:202
[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
[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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!