https://leetcode-cn.com/problems/find-largest-value-in-each-tree-row/description/ 思路: 和637. Average of Levels in Binary Tree(https://www.jianshu.com/p/814d871c5f6d)的思路基本相同.即层遍历二叉树,然后在每层中分别找最大的. vec
429.N叉树的层序遍历 public List<List<Integer>> levelOrder(Node root) { List<List<Integer>> result = new ArrayList<>(); if (root == null) { return result; } Queue<Node> queue = new