目录

力扣515. 在每个树行中找最大值

力扣515. Find Largest Value in Each Tree Row(在每个树行中找最大值)

返回二叉树每行的最大值。

示例 1:

../posts/01_学习/87_LeetCode/0515_在每个树行中找最大值/img/515-1-description.png

输入:root = [1,3,2,5,3,null,9]
输出:[1,3,9]

提示:

  • 详见原题。