LeetCode 104 二叉樹的最大深度

一:題目描述   二:題目解答 樹的題目很多都用到了遞歸。我們這裏也是 class Solution { public int maxDepth(TreeNode root) { if(root==null){ return 0; }else{ int leftLength =maxDepth(root.lef
相關文章
相關標籤/搜索