Back to All Algorithms
Double-Ended Queue (Deque)
Category: Data Structures | Time: O(1) | Space: O(n)
Visualization
Visual representation of the data structure
Enter commands to start deque visualization.
About Double-Ended Queue (Deque)

A Deque, or double-ended queue, is a generalized version of a Queue. Elements can be added or removed from either the front or the rear, providing maximum flexibility.

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
Frequently Asked Questions
About Double-Ended Queue (Deque)