Unlock problem of tries (no testcases are passing )
@Saksham12 The problem is very easy. You have made it slightly complicated. Try to traverse the loop from n to 1 and then find the position of the number in the array, if it is not in its proper position change its position else move further until you have done k swaps.
Can you please tell the error in my code
@Saksham12 I would recommend you to rewrite the code again. It would be good for you. And follow the steps I have mentioned in the above comments.