LeetCode 104 二叉树的最大深度

一:题目描述   二:题目解答 树的题目很多都用到了递归。我们这里也是 class Solution { public int maxDepth(TreeNode root) { if(root==null){ return 0; }else{ int leftLength =maxDepth(root.lef
相关文章
相关标签/搜索