Problem 663 · Medium

Equal Tree Partition

Cut one edge so both halves have the same sum: a non-root subtree must sum to half the total.

Open the interactive visualisation