A Deque (pronounced “deck”) stands for Double-Ended Queue. Unlike a standard queue, it allows you to insert and delete elements from both the front and the rear ends.

This flexibility makes Deque a hybrid structure that can function as both a Stack (LIFO) and a Queue (FIFO) depending on the operations used.
Common Operations:
- addFirst() / addLast()
- removeFirst() / removeLast()
- peekFirst() / peekLast()