(n int)
| 6 | ) |
| 7 | |
| 8 | func RandArray(n int) []int { |
| 9 | // needed a seed input else it will generate the same number |
| 10 | rand.Seed(time.Now().UnixNano()) |
| 11 | |
| 12 | arr := make([]int, n) |
| 13 | for i := 0; i <= n-1; i++ { |
| 14 | arr[i] = rand.Intn(n) |
| 15 | } |
| 16 | return arr |
| 17 | } |
nothing calls this directly
no outgoing calls
no test coverage detected