Push a new element onto the stack
(value int)
| 27 | |
| 28 | // Push a new element onto the stack |
| 29 | func (s *Stack) Push(value int) { |
| 30 | s.top = &Element{value, s.top} |
| 31 | s.size++ |
| 32 | } |
| 33 | |
| 34 | // Remove the top element from the stack and return it's value |
| 35 | // If the stack is empty, return nil |
no outgoing calls
no test coverage detected