Problem 2659 · Hard

Make Array Empty

Rotate the front of a circular array to the back until its smallest value sits at the front, then remove it; count every operation until the array is empty.

Open the interactive visualisation