[演算法笔记] 选择排序 #include <stdio.h> int slection_sort(int array[], int n) { for (int i = 0; i < n; i++){ int min_index = i; for (int j = i + 1; j < n; j++) if (array[j] < array[min_index]){ min_index = j; } swap(array[i], array[min_index]); } }