515. Find Largest Value in Each Tree Row

来源:互联网 发布:app 暂无数据图片素材 编辑:程序博客网 时间:2024/06/06 01:33

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]
code:
原创粉丝点击