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.
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.