Unlock problem doubt

can you please tell why my test case 3 failed this is my solution https://ide.codingblocks.com/s/122699

@Dhruv-Miglani-2090236747707980
Consider test case:
5 3
3 4 1 2 5

Your Output:
32765 4 3 2 1

Expected Output:
5 4 3 2 1

Dry run and check where you are going wrong.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.