Math, asked by dpadmaja2261, 1 year ago

Difference between simple queue and circular queue code gallary

Answers

Answered by writersparadise
29

A simple queue has a front end and a back end. Elements are inserted through the rear end of the queue and eliminated or removed through the front end. The drawback with this queue is that it tends to be full even after some elements are removed because the rear end is still at the last position. This consumes a lot of memory space.


A circular queue, as the name implies, is like a circle and has no front end and back end. In this case, the last node, the elements are inserted in a circular pattern. The last node always considers the head node as its next node. Thus, there is no memory wastage.
Answered by myrakincsem
11
Thank you for the asking this answer.
Simple queue composed of front as well as the back end . The elements who are supposed to left choose the front end to do so. Also elements goes inside through the rear end.
while in case of circular end there are no end. ans as the name indicate the elements are inserted through circular pattern. but as compared  to simple queue there is minimum memory waste.
Similar questions