算法 递归-二叉树的最大深度 求解代码 1 2 3 4 5 6 7 public int maxDepth (TreeNode root) { if(root==null){ return 0; } return Math.max(maxDepth(root.left),maxDepth(root.right))+1; }