Stacks
Understanding the LIFO Principle
A stack is a data structure where the last item added is the first to be removed.
Key Operations
- Push – add an item to the top
- Pop – remove the top item
- Peek – look at the top item without removing it
Learn more on
GeeksforGeeks
.