Mental Model
A dequeue lets you add or remove items from both ends, like a line where people can enter or leave from front or back.
Analogy: Imagine a double-ended queue as a hallway with doors at both ends. People can enter or exit from either door, making it flexible and quick to add or remove from front or back.
front -> [1] -> [2] -> [3] -> back ↑front pointer ↑back pointer
