Unlock problem not passing test case 1

my solution is not able to pass test case 1.how should i further optimize it.
solution link-https://online.codingblocks.com/app/player/47581/content/29643/5364

Please share your code via ide.codingblocks.com

Please note that its “atmost K” swaps instead of Exactly K swaps.
Typo will be fixed soon.
I hope you can solve the question now :slight_smile:

1 Like

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.