* Pushes an item onto the top of the stack. * @param item - The item to push * @complexity Time O(1) | Space O(1)
(item: T)
| 9 | * @complexity Time O(1) | Space O(1) |
| 10 | */ |
| 11 | push(item: T): void { |
| 12 | this.items.push(item); |
| 13 | } |
| 14 | |
| 15 | /** |
| 16 | * Removes and returns the top item; returns undefined if empty. |
no outgoing calls