Computer Science, asked by reea1889, 10 months ago

Difference between circular queue and doubly ended queue

Answers

Answered by sahasubir8
12

Circular Queue

1)In an Queue when elements are arranged in sequential manner but logically we assume it in circular format, then such queue is called as “Circular Queue”.

2)It follows “First In First Out” method for insertion and deletion of elements.

3)Liner Queue may appear to be full although there may be space in the queue, this problem is overcome due to circular nature of circular queue.

4)A variable named “FRONT” stores position of the starting element of the queue. Its incremented on deletion of an element.

5)A variable named “REAR” stores position of the last element of the queue. Its incremented on Insertion of new element.

Double Ended Queue

1)A Queue in which inserting and deleting of elements is done from both the ends, such queue is called as Double Ended Queue(DeQueue).

2)Dequeue always consists of homogeneous list of elements.

3)There are two types of DeQueue. A. Input restricted dequeues B. Output restricted dequeues.

4)Input restricted dequeues allows insertion only at one end but allows deletion of element from both the ends.

5)Output restricted dequeues allwos deletions of elements only at one end but allows insertion of element from both the ends.

Attachments:
Answered by SaurabhJacob
8

In a Circular queue, the elements are in sequential order but its end is attached to the starting. Where in Double-ended queue the insertion and deletion can be done from both ends.

In a circular queue, there is no in-between space in the queue. But there can be some spaces in the double-ended queue due to the deletion of the elements.

The Double-ended queue is of two types, input restricted and output restricted. But there is only one circular queue.

Similar questions