-Circular Queue is a linear data structure in which the operations are performed based on FIFO (First In First Out) principle and
-the last position is connected back to the first position to make a circle.
- Circular Queue is also called "Ring-Buffer"
Why circular Queue ?
Basically, In linear queue when we delete the item then value of front is increase by 1, then array slot are free but we never able to use them. So solution is circular Queue.
Advantage of circular Queue over linear Queue:
-It takes up less memory than the linear queue.
-A new item can be inserted in the location from where a previous item is deleted
-Infinite of elements can be added continuously but deletion must be used.
Disadvantage of circular queue over Linear queue:
-New items cannot be inserted continuously.
create a circular queue
traverse a circular queue
insertion in circular queue
deletion in circular queue