摘要: 559. N 叉树的最大深度 //递归 dfs class Solution { public int maxDepth(Node root) { if (root == null) return 0; int depth = 1; for (Node child : root.children) 阅读全文
posted @ 2022-03-31 21:43 一梦两三年13 阅读(23) 评论(0) 推荐(0)