Given a binary tree, find its maximum depth. class Solution { public: int maxDepth(TreeNode* root) { int depth=0; if(!root) return depth; int a=maxDep
分类:
其他好文 时间:
2016-03-08 10:46:14
阅读次数:
189
C#基础知识 1 传智播客 苏坤视频 2 赵四本 C# in depth CLR via C# 数据结构与算法 操作系统 设计模式 系统架构 需要在leetcode上刷题(有利于找工作)
分类:
其他好文 时间:
2016-03-06 11:08:08
阅读次数:
128
N*M的园子,雨后积起了水.八连通的积水背认为是连接在一起的.请求出园子里总共有多少水洼? dfs(Depth-First Search) 八个方向的简单搜索.... 深度优先搜索从最开始的状态出发,遍历所有可以到达的状态.由此可以对所有的状态进行操作,或者列举出所有的状态. 1 int N,M;
分类:
其他好文 时间:
2016-02-27 16:14:32
阅读次数:
130
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 l
分类:
其他好文 时间:
2016-02-27 08:27:45
阅读次数:
153
启动“终端”,再/应用程序/工具文件夹中。输入以下命令:sudofind/-name“.DS_Store”-depth-execrm{}\;接着输入管理员密码,这时.DS_Store全都删除了。.DS_Store(英文全称DesktopServicesStore),它是一种由苹果公司的MacOSX操作系统所创造的隐藏文件,目的在于存贮文件夹..
分类:
系统相关 时间:
2016-02-26 19:07:45
阅读次数:
249
细化方法当中,当属经典的Zhang并行快速细化算法,细化之后的轮廓走势与原图保持得相对较好。 参照 http://blog.csdn.net/byxdaz/article/details/5642669 , 代码改造结果如下, //将 DEPTH_8U型二值图像进行细化 经典的Zhang并行快速细化
分类:
其他好文 时间:
2016-02-23 20:46:35
阅读次数:
365
求一棵二叉树的最小高度,即从根节点到最近叶子节点的路径经过的节点数。...
分类:
其他好文 时间:
2016-02-23 09:49:25
阅读次数:
154
树的高度: 当只有一个根节点的时候,高度就是0。 //计算树的高度int depth(Node node){ if(node == NULL) return -1; int l = depth(node->left); int r = depth(node->right); return (l <
分类:
其他好文 时间:
2016-02-20 14:44:47
阅读次数:
384
今天在生产系统中查询产品时,莫名提示错误:maximum recursion depth exceeded while calling a Python object,根据错误日志提示,发现在查询产品时,系统会构造一个domain,查询所有库位的库存量。当仓库较多的时候,构造的这个domain比较长...
分类:
编程语言 时间:
2016-02-19 12:07:55
阅读次数:
290
今天一天折腾了这么一个正则 new Regex(@"^!?\[((?:\[[^\]]*\]|[^\[\]]|\](?=[^\[]*\]))*)\]\s*\(\s*<?((?:[^()]|\((?<DEPTH>)|\)(?<-DEPTH>))+?(?(DEPTH)(?!)))>?(?:\s+(['""
分类:
其他好文 时间:
2016-02-17 00:49:38
阅读次数:
237