码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Leetcode -- Day 65
Binary TreeQuestion 1Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree...
分类:其他好文   时间:2015-09-05 11:10:51    阅读次数:134
[LeetCode]Binary Tree Postorder Traversal
Binary Tree Postorder TraversalGiven a binary tree, return thepostordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \...
分类:其他好文   时间:2015-09-05 00:09:13    阅读次数:231
[LeetCode]Binary Tree Preorder Traversal
Binary Tree Preorder TraversalGiven a binary tree, return thepreordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:其他好文   时间:2015-09-05 00:02:05    阅读次数:302
[LeetCode]Binary Tree Inorder Traversal
Binary Tree Inorder TraversalGiven a binary tree, return theinordertraversal of its nodes' values.For example:Given binary tree{1,#,2,3}, 1 \ ...
分类:其他好文   时间:2015-09-04 23:57:27    阅读次数:365
[LeetCode] H-Index II
This problem is designed specifically to use binary search. In fact, in H-Index, someone has already used this idea (you may refer to this post :-))Th...
分类:其他好文   时间:2015-09-04 23:52:19    阅读次数:196
Validate Binary Search Tree——体现二查搜索树思想的一道题
思想其实很简单,但是我为啥就是想不到呢?????!!!!!递归判断,递归时传入两个参数,一个是左界,一个是右界,节点的值必须在两个界的中间,同时在判断做子树和右子树时更新左右界。需要考虑结点取INT_MAX 或者INT_MIN的情况,相应的改成long long 以及 LONG_LONG_MAX 和...
分类:其他好文   时间:2015-09-04 22:23:45    阅读次数:200
pat1099. Build A Binary Search Tree (30)
1099. Build A Binary Search Tree (30)时间限制100 ms内存限制65536 kB代码长度限制16000 B判题程序Standard作者CHEN, YueA Binary Search Tree (BST) is recursively defined as a ...
分类:其他好文   时间:2015-09-04 12:30:54    阅读次数:156
Stable Problems Get High-Quality Solutions
?Stable Problems Get High-Quality SolutionsSam GardinerREAl-WoRld pRogRAMMing is not about solving the problem that someone gives to you. In the computer science classroom, you must solve the binary- s...
分类:其他好文   时间:2015-09-04 08:45:39    阅读次数:145
Binary Tree Right Side View
https://leetcode.com/problems/binary-tree-right-side-view//** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *...
分类:其他好文   时间:2015-09-04 07:13:21    阅读次数:182
[LeetCode] Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1递归实现: 1 TreeNode* invertTree(TreeNo...
分类:其他好文   时间:2015-09-03 19:11:58    阅读次数:191
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!