Problem 1509 · Medium

Minimum Difference Between Largest and Smallest Value in Three Moves

Reduce the range of an array by trimming three entries from its ends in the best combination. The visual sorts the values and shows which end trims are compared.

Open the interactive visualisation