[C#][LeetCode] 515. Find Largest Value in Each Tree Row

題目

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

Example:

解題過程

這題要找出二元樹中同階層最大的數字,我的作法是先將每層的數字收集起來,最後再一起比較。

答案

 



這裡的資訊對您有用嗎?歡迎斗內給我