标签:sed sort event 选择 选择排序 none 技术 click eve
1 void selectSort(int array[], int n) { 2 int current; 3 for (current = 0; current < n; ++current) { 4 int i, min = array[current], minIndex = current; 5 for (i = current; i < n; ++i) { 6 if (array[i] < min) { 7 min = array[i]; 8 minIndex = i; 9 } 10 } 11 swap(&array[current], &array[minIndex]); 12 } 13 }
标签:sed sort event 选择 选择排序 none 技术 click eve
原文地址:https://www.cnblogs.com/zymmyz/p/12724650.html