Design a Deque data structure. Deque
A Deque is a queue where you can add and remove elements from both ends of the queue.
The name Deque is an abbreviation of Double Ended Queue. The word Deque is pronounced like a "deck" of cards.