Back to All Algorithms
Circular Queue
Category: Data Structures | Time: O(1) | Space: O(k)
Visualization
Visual representation of the data structure
Enter commands to start the circular queue visualization.
About Circular Queue

A Circular Queue is a linear data structure that follows the FIFO principle but its last position is connected back to the first position to make a circle. It is also called 'Ring Buffer'. It's an efficient implementation of a queue using a fixed-size array.

Code Editor
The code is for reference. Editing it won't affect the visualization.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
Frequently Asked Questions
About Circular Queue