C#选择法排序代码演示
public static void SelectSort (int[] list) { for (int i = 0; i < list.Length; i++) { int min = i; for (int j = i + 1; j < list.Length; j++) if(list [j] < list [min]) min = j; if(min ! = i) { int Temp = list [min]; list [min] = list [i]; list [i] = Temp; } } }