码迷,mamicode.com
首页 >  
搜索关键字:binary trees    ( 12390个结果)
[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 of the two subtrees of every node nev...
分类:其他好文   时间:2014-10-27 21:25:12    阅读次数:193
[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 example: Given binary tree {3,9,20,#,#,...
分类:其他好文   时间:2014-10-27 21:21:00    阅读次数:190
[leetcode]Symmetric Tree
问题描述: Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center). For example, this binary tree is symmetric: 1 / 2 2 / \ / 3 4 4 3 But the ...
分类:其他好文   时间:2014-10-27 21:19:41    阅读次数:231
[leetcode]Binary Tree Level Order Traversal
问题描述: Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level). For example: Given binary tree {3,9,20,#,#,15,7}, 3 / 9 ...
分类:其他好文   时间:2014-10-27 21:19:34    阅读次数:236
[leetcode]Same Tree
问题描述: Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. ...
分类:其他好文   时间:2014-10-27 21:17:54    阅读次数:165
[LeetCode] Gray Code
The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integernrepresenting the total number...
分类:其他好文   时间:2014-10-27 20:59:08    阅读次数:164
POJ 1565 Skew Binary(简单题)
【题意简述】:就是定义了另外一种数制的表示形式,并给了你这种数制表示形式与十进制的转换关系,现在给你一个这样的数制,让你把它换成2进制输出。 【分析】:其中 base[k]  =  2^(k+1)-1  =  2(2^k-1)+1  =  2base[k-1]+1 // 200K 0Ms #include #include using namespace std; int main() { ...
分类:其他好文   时间:2014-10-27 19:33:42    阅读次数:163
Binary Tree Preorder Traversal
递归实现(python):# Definition for a binary tree nodeclass TreeNode: def __init__(self, x): self.val = x self.left = None self...
分类:其他好文   时间:2014-10-27 17:21:37    阅读次数:125
将图片以二进制的方式保存在数据库中,并显示图片
http://www.aspnettutorials.com/tutorials/database/store-img-bins-asp4-cs/http://stackoverflow.com/questions/18998763/how-to-retrieve-binary-image-from...
分类:数据库   时间:2014-10-27 14:15:27    阅读次数:145
Add Binary
Question:Given two binary strings, return their sum (also a binary string).For example,a ="11"b ="1"Return"100"Solution: 1 #define MAX_STR_LEN (100...
分类:其他好文   时间:2014-10-27 12:31:45    阅读次数:187
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!