Problem 3774 · Easy

Absolute Difference Between Maximum and Minimum K Elements

Sort the numbers, then compare the sum of the k largest with the sum of the k smallest.

Open the interactive visualisation