Mental Model
A dequeue lets you add or remove items from both ends easily. It works like a line where people can enter or leave from front or back.
Analogy: Imagine a double-ended queue as a hallway where people can enter or exit from either the front door or the back door without waiting.
front -> [1] -> [2] -> [3] -> back
↑front pointer
↑back pointer