题目: 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 farthe ...
分类:
其他好文 时间:
2017-07-22 14:30:39
阅读次数:
155
记节点v到根点的深度为depth[v],那么当w是v和u的最近公共祖先时,可以想让v和u在同一个深度,即让深度高的走|depth[v]-depth[u]|然后一起走, 直到遇见相同的祖先时就是最近公共祖先了。如果是计算一次的话还可以,但有很多询问时就不行了。 那么可以利用父亲节点的信息来做了,可以通 ...
分类:
其他好文 时间:
2017-07-22 13:20:32
阅读次数:
227
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 ...
分类:
其他好文 时间:
2017-07-21 19:00:37
阅读次数:
159
题目: Given a binary tree, find its minimum depth. The minimum depth is the number of nodes along the shortest path from the root node down to the neare ...
分类:
编程语言 时间:
2017-07-19 23:38:07
阅读次数:
317
①不同Camera的Depth。(大在前,小在后)②同Camera的SortingLayer。(下在前,上在后)③同SortingLayer下的Order in Layer。(大在前,小在后)④同Order in Layer下的Z轴。(小在前,大在后) 注意: 如果是多个Canvas的渲染先后顺序 ...
分类:
编程语言 时间:
2017-07-18 01:43:34
阅读次数:
325
题目: 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 farthe ...
分类:
编程语言 时间:
2017-07-17 23:45:28
阅读次数:
212
编写高质量 JavaScript 代码的基本要点 转载:http://wiki.jikexueyuan.com/project/javascript-depth-understanding/start-javascript.html 才华横溢的 Stoyan Stefanov,在他写的由 O’Rei ...
分类:
编程语言 时间:
2017-07-17 00:33:33
阅读次数:
327
http://www.cnblogs.com/cxrs/archive/2013/03/22/DepthOfFeild.html 景深(Depth of Field) 景深(Depth of Field) 什么是景深? 所谓景深,就是当焦距对准某一点时,焦平面前后图像仍然清晰的范围。景深是摄影技术中 ...
分类:
其他好文 时间:
2017-07-13 17:14:29
阅读次数:
336
某一天我的linux机子突然磁盘满了,使用df命令查看/dev/sda1184G184G0100%/依次到根目录下使用命令查看各个目录的大小du-h-x--max-depth=1,发现所有的目录加起来只占用了20G。查看了inode节点,都没有问题埃使用lsof命令查看是否有被删除过的文件依然被程序占用lsof|grep‘(del..
分类:
系统相关 时间:
2017-07-12 12:17:59
阅读次数:
165
du -ah --max-depth=1 这个是我想要的结果 a表示显示目录下所有的文件和文件夹(不含子目录),h表示以人类能看懂的方式,max-depth表示目录的深度。 du命令用来查看目录或文件所占用磁盘空间的大小。常用选项组合为:du -sh 一、du的功能:`du` reports the ...
分类:
系统相关 时间:
2017-07-12 11:07:15
阅读次数:
296