2022年6月27日

JZ55 二叉树的深度

摘要: public class Solution { public int TreeDepth(TreeNode root) { //空节点没有深度 if(root == null) return 0; //返回子树深度+1 return Math.max(TreeDepth(root.left), Tr 阅读全文

posted @ 2022-06-27 14:54 MaXianZhe 阅读(15) 评论(0) 推荐(0)

导航