if (data[j] < value) {
minPos = j;
value = data[j];
}
}
if (minPos != -1) {
tmp = data[i];
data[i] = value;
data[minPos] = tmp;
}
// for (int k = 0; k < len; k++) {
// System.out.print(data[k] + " , "
// }
// System.out.println();
}
}
public static void main(String[] args) {
int[] coll = {
37, 40, 38, 42, 461, 5, 7, 9, 12
};
selectionSort(coll);
for (int i = 0; i < coll.length; i++) {
System.out.print(coll[i] + " , "); );