You are viewing a single comment's thread. Return to all comments →
In the j loop you need to increment 'j' not 'i'
if(arr[j] < arr[i]) { min=j; }
above 2 are errors..
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 →
In the j loop you need to increment 'j' not 'i'
if(arr[j] < arr[i]) { min=j; }
above 2 are errors..