Per-Level Mean of a Serialized Tree

Asked at Amazon · Coding Questions · Difficulty: Easy

A binary tree is given as a level-order list in which `None` marks a missing child. Compute the mean of the node values on each level, from the top level down.

Loading the problem…