Leetcode 637. Average of Levels in Binary Tree
Return an array where each element is the average of node values at that depth in a binary tree. This is a level-by-level aggregation problem (commonly solved with BFS or DFS accumulating sum/count per depth); n ≤ 10^4, node values fit 32-bit ints, and answers within 1e-5 are accepted.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
0
Hello Interview Premium
Your account is free and you can post anonymously if you choose.