deque in Python
What is a deque
?
deque
is a double-ended queue, which supports insertion and deletion from both ends.
Python’s collections module has a deque class.
Here is a quick example of the deque implementation in Python
Find the source code of the examples: https://github.com/afizs/python-notes/blob/main/advanced/02_deque.ipynb