冒号排序算法,大家多多评论哦!
public static void colonSort(int[] arrs){
for (int i = 0; i < arrs.length; i++) {
for (int j = i; j < arrs.length - 1; j++) {
if (arrs[j] > arrs[j + 1]){
arrs[j] = arrs[j] ^ arrs[j + 1];
arrs[j + 1] = arrs[j] ^ arrs[j + 1];
arrs[j] = arrs[j] ^ arrs[j + 1];
}
}
}
}