We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Hi, here is my code, and it works for test case 14 too.
I looped through each value in the array, then had a pointer that searched for an index in the array that holds the value meant to be at the current index.
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
Hi, here is my code, and it works for test case 14 too.
I looped through each value in the array, then had a pointer that searched for an index in the array that holds the value meant to be at the current index.