Stack data structures explained

Stack data structures are used for storing collection of data where order in which data is arriving is important. In Stack, insertion, and deletion both happened from the same end which is known as “Top”.
The data which is arrived last will be deleted first in Stack.
This data ordering is called as Last in First out or LIFO.

Properties

  • Insertion and Deletion both happened from the same end.
  • Sequence in which data is arrived is important.
  • Data can be accessed in Stack in LIFO (Last in First out) format.

Let’s look into the below diagram to understand how Stack works.

Stack representation
Stack representation

Let’s have a look into some of the most popular and useful topics in Stack data structures.

Leave a Reply

Your email address will not be published. Required fields are marked *