Skip to content

Latest commit

 

History

History
34 lines (22 loc) · 570 Bytes

0515-find-largest-value-in-each-tree-row.adoc

File metadata and controls

34 lines (22 loc) · 570 Bytes

515. Find Largest Value in Each Tree Row

{leetcode}/problems/find-largest-value-in-each-tree-row/[LeetCode - Find Largest Value in Each Tree Row^]

You need to find the largest value in each row of a binary tree.

Example:

Input:

          1
         / \
        3   2
       / \   \
      5   3   9

Output: [1, 3, 9]

思路分析

层序遍历

link:{sourcedir}/_0515_FindLargestValueInEachTreeRow.java[role=include]