码迷,mamicode.com
首页 >  
搜索关键字:depth    ( 1433个结果
LeetCode – Refresh – Minimum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 08:35:28    阅读次数:123
LeetCode – Refresh – Maximum Depth of Binary Tree
1 /** 2 * Definition for binary tree 3 * struct TreeNode { 4 * int val; 5 * TreeNode *left; 6 * TreeNode *right; 7 * TreeNode(i...
分类:其他好文   时间:2015-03-21 06:22:17    阅读次数:111
数组树函数
function getTree($data, $pid = 0, $key = 'id', $pKey = 'pid', $childKey = 'child', $maxDepth = 0){ static $depth = 0; $depth++; if (intval($maxDepth) ...
分类:编程语言   时间:2015-03-20 16:07:28    阅读次数:176
二叉树的深度优先和广度优先遍历
深度优先搜索算法(Depth First Search),是搜索算法的一种。是沿着树的深度遍历树的节点,尽可能深的搜索树的分支。 当节点v的所有边都己被探寻过,搜索将回溯到发现节点v的那条边的起始节点。这一过程一直进行到已发现从源节点可达的所有节点为止。如果还存在未被发现的节点,则选择其中一个作为源节点并重复以上过程,整个进程反复进行直到所有节点都被访问为止。 二叉树的深度优先遍历和先序遍...
分类:其他好文   时间:2015-03-20 10:57:09    阅读次数:150
【HDU2815】【拓展BSGS】Mod Tree
Problem DescriptionThe picture indicates a tree, every node has 2 children.The depth of the nodes whose color is blue is 3; the depth of the node whos...
分类:其他好文   时间:2015-03-20 09:14:49    阅读次数:194
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.思路分析:这题比较简单,关于树的题目通常都可以用递归解决,这题也不例外,递归解法的思...
分类:其他好文   时间:2015-03-19 06:23:34    阅读次数:126
Minimum Depth of Binary Tree
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x), left(...
分类:其他好文   时间:2015-03-17 20:01:14    阅读次数:98
Linux下查看文件和文件夹大小
df可以查看一级文件夹大小、使用比例、档案系统及其挂入点,但对文件却无能为力(如:df -h)。du可以查看文件及文件夹的大小(如:du -h --max-depth=1 /usr/local/tomcat)。
分类:系统相关   时间:2015-03-16 14:22:12    阅读次数:168
cocos2d Programming Guide
http://python.cocos2d.org/doc/programming_guide/index.htmlThe cocos2d Programming Guide provides in-depth documentation for writing applications that ...
分类:其他好文   时间:2015-03-14 15:07:50    阅读次数:143
Ray tracing performance benchmark
accel. avg size 3.14accel. avg depth 16.15accel. max size 8accel. max depth 20accel. GPIT 3.00 MBtrav. steps / ray 15.34isects / ray 10.13rp...
分类:其他好文   时间:2015-03-13 23:36:45    阅读次数:146
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!