A deque (double ended queue) is a collection of elements that you can add or remove elements from either end, like a queue or stack.
A deque (double ended queue) is a collection of elements that you can add or remove elements from either end, like a queue or stack.