* Get a random stack of N elements with data in range (min, max) */
(N, min, max int)
| 55 | } |
| 56 | /* Get a random stack of N elements with data in range (min, max) */ |
| 57 | func RandomStack(N, min, max int) *Stack { |
| 58 | rand.Seed( time.Now().UTC().UnixNano() ) // seed so that you get new stack every time |
| 59 | s := new(Stack) |
| 60 | for i := 0; i < N; i++ { |
| 61 | s.Push(RandIntBetween(min, max)) |
| 62 | } |
| 63 | return s |
| 64 | } |
| 65 | |
| 66 | func (s *Stack) String() string { |
| 67 | temporaryStack := new(Stack) |
nothing calls this directly
no test coverage detected