//冒泡排序
func mpSort(array []int) {
for i:=0;ilen(array);i++ {
for j:=0;jlen(array)-i-1;j++ {
if array[j] > array[j+1] {
array[j], array[j+1] = array[j+1], array[j]
}
}
}
}
//快速排序
func quickSort(array []int, left int, right int) {
if left right {
key := array[left]
low := left
high := right
for low high {
for low high array[high] > key {
high--
}
array[low] = array[high]
for low high array[low] key {
low++
}
array[high] = array[low]
}
array[low] = key
quickSort(array, left, low-1);
quickSort(array, low+1, right);
}
}