Problem 1120 · Medium

Maximum Average Subtree

Every subtree gets a total and a node count from its children; the largest total-over-count across all subtrees wins.

Open the interactive visualisation