码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
LeetCode——Lowest Common Ancestor of a Binary Search Tree
Description:Given a binary search tree (BST), find the lowest common ancestor (LCA) of two given nodes in the BST.According to thedefinition of LCA on...
分类:其他好文   时间:2015-08-13 06:26:55    阅读次数:107
LeetCode:Invert Binary Tree
Invert a binary tree. 4 / 2 7 / \ / 1 3 6 9 to 4 / 7 2 / \ / 9 6 3 1 解题思路:类似于后序遍历的思想,递归的思想,先完成左子树的交换,再完成右子树的交换,再将根节点的左右子树交换。 未优化代码如下:...
分类:其他好文   时间:2015-08-13 01:18:13    阅读次数:136
LeetCode222——Count Complete Tree Nodes
Given a complete binary tree, count the number of nodes. Definition of a complete binary tree from Wikipedia: In a complete binary tree every level, except possibly the last, is completely fille...
分类:其他好文   时间:2015-08-13 01:13:54    阅读次数:117
LeetCode:Same Tree - 判断两颗树是否相等
1、题目名称 Same Tree(判断两棵树是否相等) 2、题目地址 https://leetcode.com/problems/same-tree/ 3、题目内容 英文:Given two binary trees, write a function to check if they are equal or not. Two b...
分类:其他好文   时间:2015-08-12 23:43:01    阅读次数:147
Balanced Binary Tree
Given a binary tree , determine if it is height-balancedimplement method is in java language,iterator through the height rather than the depthpublic i...
分类:其他好文   时间:2015-08-12 21:32:32    阅读次数:116
[LeetCode] Balanced Binary Tree
Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth...
分类:其他好文   时间:2015-08-12 19:14:43    阅读次数:91
API、ABI区别
http://blog.csdn.net/xinghun_4/article/details/7905298应用程序二进制接口(ABI-Application Binary Interface)定义了一组在PowerPC系统软件上编译应用程序所需要遵循的一套规则。主要包括基本数据类型,通用寄存器的使...
分类:Windows程序   时间:2015-08-12 19:09:28    阅读次数:205
LeetCode:Binary Tree Level Order Traversal II (按层遍历)
Given a binary tree, return the bottom-up level order traversal of its nodes' values. (ie, from left to right, level by level from leaf to root). For ...
分类:其他好文   时间:2015-08-12 18:38:18    阅读次数:106
[LeetCode] Invert Binary Tree
Invert a binary tree. 4 / \ 2 7 / \ / \1 3 6 9to 4 / \ 7 2 / \ / \9 6 3 1 这道题呢=。=看着题目简介挺有意思的。哈哈哈。~说实话我真的很讨厌whit...
分类:其他好文   时间:2015-08-12 18:18:46    阅读次数:102
[LeetCode] Populating Next Right Pointers in Each Node II
Populating Next Right Pointers in Each Node II Follow up for problem "Populating Next Right Pointers in Each Node". What if the given tree could be any binary tree? Would your previous solutio...
分类:其他好文   时间:2015-08-12 16:51:54    阅读次数:112
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!