码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Recover Binary Search Tree
Two elements of a binary search tree (BST) are swapped by mistake.Recover the tree without changing its structure.Note:A solution using O(n) space is ...
分类:其他好文   时间:2014-08-28 19:33:55    阅读次数:266
【算法导论学习-24】二叉树专题2:二叉搜索树(Binary Search Tree,BST)
二叉搜索树(Binary Search Tree,BST)的一点总结。...
分类:其他好文   时间:2014-08-28 14:52:59    阅读次数:215
LeetCode Binary Tree Postorder Traversal
Given a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[3,2,1]. 1...
分类:其他好文   时间:2014-08-28 11:12:49    阅读次数:209
【leetcode】Binary Tree Postorder Traversal
题目:...
分类:其他好文   时间:2014-08-28 09:44:59    阅读次数:165
Convert Sorted Array to Binary Search Tree & Convert Sorted List to Binary Search Tree
Convert Sorted Array to Binary Search TreeGiven an array where elements are sorted in ascending order, convert it to a height balanced BST.方法:将有序数组转为平...
分类:其他好文   时间:2014-08-27 23:17:18    阅读次数:278
LeetCode: Binary Tree Zigzag Level Order Traversal
LeetCode: Binary Tree Zigzag Level Order TraversalGiven a binary tree, return the zigzag level order traversal of its nodes' values. (ie, from left to...
分类:其他好文   时间:2014-08-27 23:10:28    阅读次数:316
LeetCode: Binary Tree Level Order Traversal
LeetCode: Binary Tree Level Order TraversalGiven a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level ...
分类:其他好文   时间:2014-08-27 21:55:48    阅读次数:326
LeetCode: Maximum Depth of Binary Tree
LeetCode: Maximum Depth of Binary TreeGiven a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from...
分类:其他好文   时间:2014-08-27 21:54:58    阅读次数:234
LeetCode: Balanced Binary Tree
LeetCode: Balanced Binary TreeGiven a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a ...
分类:其他好文   时间:2014-08-27 21:51:38    阅读次数:199
39. Recover Binary Search Tree && Validate Binary Search Tree
思想: Morris traversal. Solution 1 : Preorder traversal Solution 2: Inorder traversal. Solution 3: Morris Traversal.
分类:其他好文   时间:2014-08-27 20:25:48    阅读次数:273
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!