You are viewing a single comment's thread. Return to all comments →
static int minimumSwaps(int[] a) { int n=a.length; int i,temp,swap=0; for(i=0;i
a[temp]=a[i]; a[i]=i+1; swap++; }
}
return swap; }
Minimum Swaps 2
You are viewing a single comment's thread. Return to all comments →
static int minimumSwaps(int[] a) { int n=a.length; int i,temp,swap=0; for(i=0;i
}
return swap; }