+ 1
What is stack and queue in simple words?
Stack is a process of "Last In First Out " Queue is a process of "First In First Out"
1 Answer
+ 2
Let me give you some Examples.
When you place some objects one over another so that the last object placed must be put out first then it's a stack. For example- a stack of books on a table. You have to put out the books in the reverse order as you put them there i.e the book that you put last will be picked up first.
However when the First element has to be put out First then it is a queue.
For example- a queue for Railway tickets(Who come first, get first and go first)