标签:problem 常见 script node div 解决 span ini root
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { public int maxDepth(TreeNode root) { if(root == null){ return 0; } return Math.max(maxDepth(root.right),maxDepth(root.left))+1; } }
Maximum Depth of Binary Tree-二叉树的最大深度
标签:problem 常见 script node div 解决 span ini root
原文地址:https://www.cnblogs.com/runs/p/9126277.html