Stack
Last updated
Was this helpful?
Last updated
Was this helpful?
Think of it as a stack of plates, cards, ...
It has 2 principles
LIFO: Last in, First out --> The element that was added last, is processed first
FIFO: First in, First out --> The element that was added first, is processed first
Done through the operations POP and PUSH
Implementation is done through an array, pointer or linked list
It adds the elements after each other as soon as they appear
Insert
Deletion
isEmpty
top or peek