IN-FEED-AD

Queue Types - Data Structure

Queue Types- Data Structure

Queue is a Linear data structure, which follow particular order in which the operations are performed.it follow FIFO( First in First out). the element that firstly inserted in queue, will be removed first.
There are four Types of Queue
  • Simple Queue
  • Circular Queue
  • Priority Queue
  • Dequeue (Double Ended Queue)

Simple Queue:-

In a simple queue, insertion takes place at the rear and removal occurs at the front. It strictly follows FIFO rule. 


Simple Queue - Queue Type

Circular Queue:-

In a circular queue, all nodes are treated as circular. Last node is connected back to the first node.Circular queue is also called as Ring Buffer.

  
Circular Queue- Queue Type

Circular Queue- Queue Type


Priority Queue
 

A priority queue is a special type of queue in which each element is associated with a priority and is served according to its priority. If elements with the same priority occur, they are served according to their order in the queue.
Priority Queue
Priority Queue Example

 
Priority queue contains data items which have some preset priority. While removing an element from a priority queue, the data item with the highest priority is removed first.In a priority queue, insertion is performed in the order of arrival and deletion is performed based on the priority.

Related Other Post

Dequeue (Double Ended Queue):-

In Double Ended Queue, insert and delete operation can be occur at both ends that is front and rear of the queue. Thus, it does not follow FIFO rule (First In First Out). 
Double Ended Queue

Ask question #Pywix

Please Like, Comment, Share and Subscribe THANK YOU!



Post a Comment

0 Comments