码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
LeetCode Binary Search Tree Iterator
class BSTIterator {private: TreeNode* current; stack nodeStack;public: BSTIterator(TreeNode *root) { current = root; } /** @retu...
分类:其他好文   时间:2015-01-23 00:37:56    阅读次数:226
Flatten Binary Tree to Linked List
随笔一记,留做重温!Flatten Binary Tree to Linked ListGiven a binary tree, flatten it to a linked list in-place. For example,Given 1 / \ 2 ...
分类:其他好文   时间:2015-01-22 19:38:34    阅读次数:219
【LeetCode】Binary Tree Maximum Path Sum 解题报告
【题目】 Given a binary tree, find the maximum path sum. The path may start and end at any node in the tree. For example: Given the below binary tree, 1 / 2 3 Re...
分类:其他好文   时间:2015-01-22 18:16:26    阅读次数:130
二叉树系列 - 二叉搜索树 - 线性时间内把有序链表转化为BST
引言本文来自于Google的一道题目:how to merge two binary search tree into balanced binary search tree.how to merge two binary search tree into balanced binary searc...
分类:其他好文   时间:2015-01-22 14:39:12    阅读次数:207
二叉树系列 - 二叉搜索树 - 线性时间内把有序链表转化为BST
引言本文来自于Google的一道题目:how to merge two binary search tree into balanced binary search tree.how to merge two binary search tree into balanced binary searc...
分类:其他好文   时间:2015-01-22 13:15:23    阅读次数:129
MYSQL数据类型转换
CONVERT(expr USING transcoding_name)CONVERT(expr,type) 类型必须用下列的类型:可用的类型 二进制,同带binary前缀的效果 : BINARY 字符型,可带参数 : CHAR() 日期 : DATE 时间: TIME 日期时间型 : ...
分类:数据库   时间:2015-01-22 12:58:45    阅读次数:303
Unique Binary Search Trees II
生成不相同的二叉树 /** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * }; */ c...
分类:其他好文   时间:2015-01-22 11:08:05    阅读次数:126
LeetCode-94 Binary Tree Inorder Traversal
Given a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ 2 / 3return[1,3,2].Note...
分类:其他好文   时间:2015-01-22 01:34:22    阅读次数:170
[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-01-22 00:10:30    阅读次数:188
[LeetCode] Unique Binary Search Trees II dfs 深度搜索
Givenn, generate all structurally uniqueBST's(binary search trees) that store values 1...n.For example,Givenn= 3, your program should return all 5 uni...
分类:其他好文   时间:2015-01-21 23:56:18    阅读次数:228
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!