Courses/Collections & Stdlib Toolbox

๐Ÿงฐ Collections & Stdlib Toolbox

deque

O(1) appends and pops at both ends.

deque is a double-ended queue. Use it for sliding windows, BFS, and bounded buffers (maxlen=...).

main.py
Output
Press Run to execute.
Expected output
[0, 1, 2, 3, 4]
0 4

Sign in to track your progress across lessons.