Problem 3634 · Medium

Minimum Removals to Balance Array

Sort the values, then slide a window whose smallest value sets the limit.

Open the interactive visualisation