You are tasked to sort **this** permutation of integers from 1 to 1000.

You are supposed to do so using the following operation (and only the following operation):

Remove an element, then insert it at any position that you choose in the list, shifting elements if necessary.

Each time this operation is done, it takes a cost of 1. What is the minimum cost of sorting this permutation?

×

Problem Loading...

Note Loading...

Set Loading...