You need to find the largest value in each row of a binary tree.
Example
Input:
1 | 1 |
Output: [1, 3, 9]
Code
1 | public class TreeNode { |
1 | public List<Integer> largestValues(TreeNode root) { |
写BUG的程序猿
You need to find the largest value in each row of a binary tree.
Input:
1 | 1 |
Output: [1, 3, 9]
1 | public class TreeNode { |
1 | public List<Integer> largestValues(TreeNode root) { |