Regarding the left swaps once the array becomes completely sorted in descending order

suppose my k =6
arr = 3 4 1 2 5
first swap :: 5 4 1 2 3
second swap :: 5 4 3 2 1
but still i am left with 4 more swaps …
so how should i proceed with that now

i am not able to pass test case 4 … beacuse my array is already completely sorted and i am still left with k…k does not become zero

just swap last two elements number of times k left…

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.