206、N叉树的最大深度

题目描述: 很明显使用的是递归来进行 我的代码: class Solution { public int maxDepth(Node root) { int max = 0; if(root == null){ return 0; } if(root.children.size() == 0){ return 1; } List<Integer> r
相关文章
相关标签/搜索