Problem 1530 · Medium

Number of Good Leaf Nodes Pairs

Each subtree reports how many leaves sit at each depth; pairs are counted where two subtrees meet, using depth sums.

Open the interactive visualisation