You are given n notes in the wallet. You can take a note and insert this note at any place among the remaining notes. Please determine the minimum number of steps he requires to achieve his goal. You have to develop a program which prints the number of steps required to organize the wallet.
Test Case 1:
12
500 500 100 200 200 100 500 500 100 200 200 100
Output:
7
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here