
176 Data Structures Using C
Now, the queue is useless because the queue is full (Rear > = N − 1) as well as empty (Front =
Rear
). Thus, no additions and deletions can be performed. This situation can be handled by resetting
Front and Rear to 0th location, i.e., Front = Rear = 0.
(2) The major drawback of linear queue is that at a given time, all the locations to the left of Front
are always vacant and unutilized.
4.3.2 Circular Queue
The drawback of the linear queues, as discussed above, can be removed by making the queue spill over
the elements from last position of array to the 0th element. This arrangement of elements makes the
queue as ...