} int t = ar[i]; ar[i] = ar[r]; ar[r] = t; return i; } colegiohispanomexicano.net – Algorithms Notes 161