Sorting 这是一种选择吗?

Sorting 这是一种选择吗?,sorting,selection-sort,Sorting,Selection Sort,我刚刚提出了这个排序算法,它不同于我在互联网上找到的其他选择排序。这算是一种选择排序吗 for(mindex = 0; mindex < length; mindex++) { for(index = mindex + 1; index < length; index++) { if(array[mindex] > array[index]) { int temp = array[mindex]; arr

我刚刚提出了这个排序算法,它不同于我在互联网上找到的其他选择排序。这算是一种选择排序吗

for(mindex = 0; mindex < length; mindex++) {

    for(index = mindex + 1; index < length; index++) {
        if(array[mindex] > array[index]) {
            int temp = array[mindex];
            array[mindex] = array[index];
            array[index] = temp;
        }//End of swap
    }//End of index loop
}//End of main loop
for(mindex=0;mindex数组[index]){
int temp=数组[mindex];
数组[mindex]=数组[index];
数组[索引]=温度;
}//互换结束
}//索引循环结束
}//主回路末端

这类似于选择排序。你只需要做很多额外的交换,这可能会让它变慢。

这看起来像是泡泡运动。