首页
科技
登录
6mi
u
盘
搜
搜 索
科技
剑指offer(牛客网)二叉树的深度
剑指offer(牛客网)二叉树的深度
it
2025-03-04
27
public class Solution { public int TreeDepth(TreeNode root) { if(root == null) { return 0; } return Math.max(TreeDepth(root.left), TreeDepth(root.right)) + 1; } }
转载请注明原文地址: https://win8.8miu.com/read-1545274.html
最新回复
(
0
)