DEV Community

Cover image for What is a stack and where can it be used?
Fredson Gisa Kaze
Fredson Gisa Kaze

Posted on

What is a stack and where can it be used?

Stack is a linear data structure that follows a particular order in which the various operations are performed. The order may be LIFO(Last In First Out) or FILO(First In Last Out). There are many real-life examples of a stack.
Consider a box containing books, the book which was inserted in lastly will be easily first removed

Top comments (0)