Question: What is the main advantage of using a deque over a regular queue?
Options:
Correct Answer: Ability to add/remove from both ends
Solution:
A deque (double-ended queue) allows for adding and removing elements from both ends, providing more flexibility than a regular queue.