Search
⌘K
Get Premium
Leetcode 515. Find Largest Value in Each Tree Row
Given the root of a binary tree, return an array of the maximum value in each level (row) of the tree from top to bottom. This is a level-wise aggregation problem typically solved with a breadth-first traversal (or DFS with depth tracking) to compute the max for each depth.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.