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.
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.
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 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.
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 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
- Data-Structure-NTA-NET-Notes
- Prim's Algorithm
- Flip-Flop-Digital-electronics
- Find Inorder, Preorder, Postorder using Binary Search tree
- Construct Binary Tree using Postorder and Inorder Traversal
- Construct Binary Tree using Preorder and Inorder Traversal
0 Comments
if u have any doubts please let me know,