/* related posts with thumb nails */

Different types of queues:

4 A queue is a type of abstract data type that can be implemented as a linear or circular list.

4 A queue has a front and a rear.

Queue can be of four types:

1. Simple Queue

2. Circular Queue

3. Priority Queue

4. Dequeue (Double Ended queue)

1. Simple Queue: In Simple queue Insertion occurs at the rear of the list, and deletion occurs at the front of the list.




2. Circular Queue : A circular queue is a queue in which all nodes are treated as circular such that the first node follows the last node.




3. Priority Queue: A priority queue is a queue that contains items that have some preset priority. When an element has to be removed from a priority queue, the item with the highest priority is removed first





4. Dequeue (Double Ended queue): In dequeue(double ended queue) Insertion and Deletion occur at both the ends i.e. front and rear of the queue.







0

1

2

Priority

30

40

11

99

22

33

NULL

NULL

NULL

30, 40 highest priority

11, 22, 33 next priority

99 least priority

Assumptions

Related Topics:

6 comments:

Unknown said...

insertion for a simple queue occurs at rear (behind ) and deletion occurs at front .Only then will it follow the principle of FIFO.

Unknown said...

Queues - Fifo
Stacks - lifo

SUDIP KUMAR MAITY said...

when you removed and element you get the oldest element you pushed in ,in Queue.

Unknown said...

if the packet size is greater than buffer size in case of FIFO queue is it possible in noc

bhanu said...

nice short explanation

Ravi said...

Kooch bhi

Post a Comment