29 lines
335 B
Go
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])
|
|
}
|
|
} |