You are viewing a single comment's thread. Return to all comments →
A very very nice solution. I was stuck on how to swap arr[i] and the actual i+1 value. That while loop is so smart!
Seems like cookies are disabled on this browser, please enable them to open this website
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
A very very nice solution. I was stuck on how to swap arr[i] and the actual i+1 value. That while loop is so smart!