分部类型:可以在多个源文件中为一个类型编写代码。特别适用于部分代码是自动生成,而其他代部分的代码为手写类型。静态类:对工具类进行整理,以便编译器能明白你是否在不恰当的地使用它们,并使你的意图更清晰。独立的取值方法/赋值方法属性访问器:属性终于有了公有取值方法和私有赋值方法了!(这不是惟一的组合,不过...
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...
分类:
其他好文 时间:
2015-08-17 11:37:33
阅读次数:
123
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...
分类:
其他好文 时间:
2015-08-15 22:42:42
阅读次数:
138
This problem is just similar toMinimum Depth of Binary Tree.The first solution also uses recursion (not sure whether it can be called DFS).1 class Sol...
分类:
其他好文 时间:
2015-08-15 19:52:05
阅读次数:
123
Well, this problem has the highest acceptance rate among all OJ problems. It has a very easy 1-line reursive solution. I am not sure whether this one ...
分类:
其他好文 时间:
2015-08-15 19:49:12
阅读次数:
131
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 never diffe...
分类:
其他好文 时间:
2015-08-14 19:18:52
阅读次数:
123
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.
Show Tags
Show Similar Proble...
分类:
其他好文 时间:
2015-08-14 01:11:52
阅读次数:
136
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...
分类:
其他好文 时间:
2015-08-13 11:31:07
阅读次数:
102
import sys def pstack(depth = 0): frame = sys._getframe(depth) cnt = 0 while frame: print "###", cnt, frame.f_code.co_name, frame.f_code.co_filename, ...
分类:
编程语言 时间:
2015-08-13 00:50:32
阅读次数:
424
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...
分类:
其他好文 时间:
2015-08-12 19:14:43
阅读次数:
91