public class Solution { public int TreeDepth(TreeNode pRoot){ return pRoot == null? 0 : Math.max(TreeDepth(pRoot.left),TreeDepth(pRoot.right)) + 1; } }
二叉树的深度
原文:http://www.cnblogs.com/LoganChen/p/6486625.html