2
0
mirror of https://github.com/0xAX/go-algorithms synced 2024-11-13 13:10:30 +00:00
go-algorithms/utils.go
2015-12-26 18:34:44 +06:00

12 lines
178 B
Go

package utils
import "math/rand"
func RandArray(n int) []int {
arr := make([]int, n)
for i := 0; i <= n - 1; i++ {
arr[i] = rand.Intn(n)
}
return arr
}