码迷,mamicode.com
首页 >  
搜索关键字:binary    ( 11734个结果)
Maximum Depth of Binary Tree 二叉树的最大深度
Given a binary tree, find its maximum depth.The maximum depth is the number of nodes along the longest path from the root node down to the farthest le...
分类:其他好文   时间:2014-10-26 07:58:51    阅读次数:161
Binary Tree Level Order Traversal 二叉树层序遍历
Given a binary tree, return thelevel ordertraversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree{3,9,2...
分类:其他好文   时间:2014-10-26 06:48:34    阅读次数:188
[Leetcode] Populating Next Right Pointers in Each Node
Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *next; }Populate each next pointe...
分类:其他好文   时间:2014-10-26 06:47:59    阅读次数:160
Binary Tree Level Order Traversal II 二叉树层序遍历之二
Given a binary tree, return thebottom-up level ordertraversal of its nodes' values. (ie, from left to right, level by level from leaf to root).For exa...
分类:其他好文   时间:2014-10-26 06:47:17    阅读次数:187
【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-25 23:09:06    阅读次数:447
二分查找函數
找到,返回下標; int binary_search(const int* a, int low_position, int high_position, const int key) { high_position--; while(low_position < high_position) { int mid_position = (low_position+...
分类:其他好文   时间:2014-10-25 23:04:40    阅读次数:155
UVA12304 2D Geometry 110 in 1! 计算几何
计算几何: 堆几何模版就可以了。。。。 Description Problem E 2D Geometry 110 in 1! This is a collection of 110 (in binary) 2D geometry problems. CircumscribedCircle x1 y1 x2 y2 x3 y3 Fi...
分类:其他好文   时间:2014-10-25 22:59:03    阅读次数:246
MAC中用ImageMagick转换图像
MAC上,安装p_w_picpathmagic:下载:http://www.p_w_picpathmagick.org/script/binary-releases.php#macosx安装:Create(orchoose)adirectorytoinstallthepackageintoandchangetothatdirectory,forexample:$cd$HOMENext,extractthecontentsofthepackage.Forexample:$tarxvzfIm..
分类:系统相关   时间:2014-10-25 18:54:49    阅读次数:672
【LeetCode】 Maximum Depth of Binary Tree
题目 Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the longest path from the root node down to the farthest leaf node....
分类:其他好文   时间:2014-10-25 18:50:01    阅读次数:137
Ural 1081 Binary Lexicographic Sequence(DP)
题目地址:Ural 1081 先用dp求出每个长度下的合法序列(开头为1)的个数。然后求前缀和。会发现正好是一个斐波那契数列。然后每次判断是否大于此时长度下的最少个数,若大于,说明这一位肯定是1,若小于,则肯定是0.就这样不断输出出来即可。 代码如下: #include #include #include #include #include #include #include ...
分类:其他好文   时间:2014-10-24 23:40:46    阅读次数:312
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!