Stack is a LIFO list
| 21 | type ( |
| 22 | // Stack is a LIFO list |
| 23 | Stack interface { |
| 24 | // length of stack |
| 25 | Len() int |
| 26 | |
| 27 | // add an item to the stack |
| 28 | Push(interface{}) |
| 29 | |
| 30 | // remove an item from the stack |
| 31 | Pop() interface{} |
| 32 | |
| 33 | // return (but not remove) the top item on the stack |
| 34 | Peek() interface{} |
| 35 | } |
| 36 | ) |
| 37 | |
| 38 | // NewStack creates a new stack |
no outgoing calls
no test coverage detected