Math, asked by anshusainibala2589, 1 year ago

Difference between linear and circular queue

Answers

Answered by myrakincsem
4
When it's comes to the linear queue it have two ends , front as well as the back. Elements are remover from the front end while are inserted through the other end. But this queue remains full even if you remove some of the elements from it.

While in case of circular queue there is no front and back end and elements are inserted in the circular pattern . as compared to linear queue there is no memory lose.
Answered by writersparadise
5

A linear queue is the traditional straight line queue with both a front end and a back end. In this queue, elements are inserted through the back and removed from the front end. However, there is a drawback with this queue. The queue continues to be full even after a few elements have been eliminated. This is because the rear end continues to be at the same last position that it was originally. This in turn results in a lot of memory consumption.


A circular queue, like its name, is in a circular pattern with no no front end and back end. The last position and the front position are connected to each other to form a circle. Memory consumption is less in this buffer.
Similar questions