It is troublesome to design contest questions. It will be much better
if someone can help...
You are given a permutation of 1,2,..., n.
In each step, you can either move an integer to the front
or move an integer to the end. What is the minimum number
of steps to sort the permutation (in ascending order)?
4 1 2 3 4 5 5 4 3 2 1 6 5 2 1 3 6 4 0
0 4 3