Dequeues
A deque, short for double-ended queue, is a data structure that supports insertion and removal of elements at both ends. It combines aspects of queues and stacks, offering end-oriented operations while maintaining the order of elements in the middle. Deques are versatile when both ends of a sequence may need to be accessed or modified.
Core operations typically include adding to the front (push_front or addFirst) and adding to the back (push_back
Implementations of deques commonly fall into two categories. An array-based circular buffer keeps elements in a
Use cases for deques include breadth-first search, task scheduling, and buffering scenarios where both ends may