LIFOs, Last-In-First-Out
Defined 3 operations:
push(x)
pop()
is_empty()
If pop up by empty stack, throw EmptyStackException
.
Could be done by Array, LinkedList or etc.
- "Stack - Wikipedia" https://en.wikipedia.org/wiki/Stack_(abstract_data_type)
LIFOs, Last-In-First-Out
Defined 3 operations:
push(x)
pop()
is_empty()
If pop up by empty stack, throw EmptyStackException
.
Could be done by Array, LinkedList or etc.