algorithms-go/base/排序/归并排序/main.go
2021-04-07 18:13:02 +08:00

29 lines
335 B
Go

package main
import (
"fmt"
"math/rand"
)
var (
a [100000]int
tmp [100000]int
)
func merge_sort(l, r int) {
}
func main() {
for i := 0; i < 10; i++ {
a[i] = rand.Intn(100)
}
for i := 0; i < 10; i++ {
fmt.Printf("%d ", a[i])
}
fmt.Println()
merge_sort(0, 9)
for i := 0; i < 10; i++ {
fmt.Printf("%d ", a[i])
}
}