Average Of Levels Problem

Average Of Levels Problem — ExecCode Medium DSA Practice

Solve the Average Of Levels problem on ExecCode. Free online medium DSA practice in Arrays - Basics. Write and run code in Java, C++, Python — no signup required to run.

Problem description

Practice companion for CodeFlow average-of-levels.

Examples

Input {"root": [10, 4, 16, 1, 7, 11, 20]}; Output [10.0,10.0,9.75]. Input {"root": [3, 9, 20, null, null, 15, 7]}; Output [3.0,14.5,11.0]. Input {"root": [1]}; Output [1.0]

Constraints

1 ≤ n ≤ 10^5

Practice Average Of Levels free on ExecCode. Browse DSA problems, topic map, and placement guides.