Stack
Stack
"Stack is a linear data structure in which insertion and deletion of an element takes place from only one end called as top of the stack".
Fig: Stack
The element inserted last will be removed first that's why stack is also called as LIFO (Last-In-First-Out) or FILO (First-In-Last-Out) data structure.
Examples of Stack:
1) Stack of coins.
2) Stack of books in library.
3) Stack of dishes in hotel.
No comments: