Push a new element onto the stack
(value int)
| 17 | |
| 18 | // Push a new element onto the stack |
| 19 | func (s *Stack) Push(value int) { |
| 20 | s.top = &Element{value, s.top} |
| 21 | s.size++ |
| 22 | } |
| 23 | |
| 24 | // Remove the top element from the stack and return it's value |
| 25 | // If the stack is empty, return nil |