码迷,mamicode.com
首页 >  
搜索关键字:bst    ( 4557个结果
Validate Binary Search Tree
https://oj.leetcode.com/problems/validate-binary-search-tree/Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is ...
分类:其他好文   时间:2015-02-27 21:24:37    阅读次数:143
PAT1064. Complete Binary Search Tree
A Binary Search Tree (BST) is recursively defined as a binary tree which has the following properties:The left subtree of a node contains only nodes w...
分类:其他好文   时间:2015-02-26 21:32:47    阅读次数:191
[LeetCode] Convert Sorted List to Binary Search Tree
Given a singly linked list where elements are sorted in ascending order, convert it to a height balanced BST.解法:自底向上 时间复杂度O(n), 空间复杂度O(logN) 1 clas...
分类:其他好文   时间:2015-02-26 19:58:04    阅读次数:166
Binary Search Tree Iterator
https://oj.leetcode.com/problems/binary-search-tree-iterator/Implement an iterator over a binary search tree (BST). Your iterator will be initialized ...
分类:其他好文   时间:2015-02-26 18:22:37    阅读次数:206
[LeetCode] Unique Binary Search Trees 独一无二的二叉搜索树
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:其他好文   时间:2015-02-25 15:32:26    阅读次数:109
leetcode------Validate Binary Search Tree
标题Validate Binary Search Tree通过率21.9%难度中等Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:T...
分类:其他好文   时间:2015-02-25 12:52:41    阅读次数:144
[LeetCode] Validate Binary Search Tree 验证二叉搜索树
Given a binary tree, determine if it is a valid binary search tree (BST).Assume a BST is defined as follows:The left subtree of a node contains only n...
分类:其他好文   时间:2015-02-24 06:55:58    阅读次数:171
[LeetCode] 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 ...
分类:其他好文   时间:2015-02-23 15:26:34    阅读次数:168
leetcode 96. Unique Binary Search Trees
Givenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a total of 5 unique BST's. 1.....
分类:其他好文   时间:2015-02-19 16:19:37    阅读次数:157
bzoj 1012 BST 支持插入,区间最大
水。。。 1 /************************************************************** 2 Problem: 1012 3 User: idy002 4 Language: C++ 5 Result: A...
分类:其他好文   时间:2015-02-19 16:15:53    阅读次数:147
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!