Make Costs of Paths Equal in a Binary Tree
Working upward from the leaves, each node raises its cheaper child subtree to match the costlier one, which keeps every path equal at the lowest cost.
Working upward from the leaves, each node raises its cheaper child subtree to match the costlier one, which keeps every path equal at the lowest cost.