A high-performance, memory-efficient double-ended queue (deque) that automatically grows and can be configured to shrink.
Checks if the deque is empty.
O(1)
Returns the first element.
Returns the last element.
The number of elements in the deque.
Returns an iterator over the elements of the deque.
O(n)
Clears all elements from the deque.
Removes and returns the element from the back of the deque.
O(1) amortized
Adds an element to the back of the deque.
Removes and returns the element from the front of the deque.
Adds an element to the front of the deque.
A high-performance, memory-efficient double-ended queue (deque) that automatically grows and can be configured to shrink.