Problem 2740 · Medium

Find the Value of the Partition

Sort the numbers; the cheapest split always falls between two neighbouring values, so the answer is the smallest gap.

Open the interactive visualisation