Queue data structures are used for storing collection of data where order in which data is arriving is important. In Queue, insertion and deletion both happened from the different end.
Data insertion are done at one end which is known as “rear end” while data deletion are done at other end known as “front end“. The data which is arrived first will be deleted first in Queue.
This data ordering is called as First in First out or FIFO.
Properties
- Insertion and Deletion both happened from the different end.
- Sequence in which data is arrived is important.
- Data can be accessed in Queue in FIFO (First in First out) format.
Let’s look into the below diagram to understand how Queue works.
Let’s have a look into some of the most popular and useful topics in Queue data structures.