Queue can be classified into following types:
- Simple Queue – is a linear data structure in which removal of elements is done in the same order they were inserted i.e., the element will be removed first which is inserted first.
- Circular Queue – is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and the last position is connected back to the first position to make a circle. It is also called Ring Buffer. Circular queue avoids the wastage of space in a regular queue implementation using arrays.
- Priority Queue – is a type of queue where each element has a priority value and the deletion of the elements is depended upon the priority value
- In case of max-priority queue, the element will be deleted first which has the largest priority value
- In case of min-priority queue the element will be deleted first which has the minimum priority value.
- De-queue (Double ended queue) – allows insertion and deletion from both the ends i.e. elements can be added or removed from rear as well as front end.
- Input restricted deque – In input restricted double ended queue, the insertion operation is performed at only one end and deletion operation is performed at both the ends.
- Output restricted deque – In output restricted double ended queue, the deletion operation is performed at only one end and insertion operation is performed at both the ends.