Fading Coder

One Final Commit for the Last Sprint

Computing the Maximum Value in Each Level of a Binary Tree

Given the root of a binary tree, return a list where each element is the largest value in its corresponding tree level. Example 1: Input: root = [1,3,2,5,3,null,9] Output: [1,3,9] Example 2: Input: root = [1,2,3] Output: [1,3] Constraints: The number of nodes is in the range [0, 10^4]. -2^31 <= N...