Stack
Last In First Out (LIFO)
The last item to be inserted into a stack is the first one to be deleted from it.
Example: A stack of trays on a table, the tray at the top of the stack is the first item to be moved if you require a tray from that stack.
Applications
undo/redo functionality
word reversal
stack backward/forward on browsers
backtracking algorithms
bracket verification
Last updated
Was this helpful?