Pop the top item of the Stack and return it
()
| 28 | |
| 29 | // Pop the top item of the Stack and return it |
| 30 | func (s *Stack) Pop() int32 { |
| 31 | if s.top == -1 { |
| 32 | return -1 |
| 33 | } |
| 34 | |
| 35 | s.top-- |
| 36 | return s.st[(s.top + 1)] |
| 37 | } |
| 38 | |
| 39 | // Push a value onto the top of the Stack |
| 40 | func (s *Stack) Push(value int32) { |
no outgoing calls
no test coverage detected