封装成函数:
//交换数组元素func swap(slice []int, i j ) { slice[i],76)">j]=]}//选择排序func SelectionSorts l := lens //以免每次循环判断都运算 m )-1 for i:=0;<m++ ki j+1lif s]<k k j}!=i swap}}
测试:
//交换数组元素func swap(slice []int, i j ) { slice[i],76)">j]=]}//选择排序func SelectionSorts l := lens //以免每次循环判断都运算 m )-1 for i:=0;<m++ ki j+1lif s]<k k j}!=i swap}}