Question: In which scenario would you prefer a stack over a queue?
Options:
Correct Answer: When you need to backtrack through previous states
Solution:
Stacks are ideal for backtracking scenarios, such as navigating through a maze or undoing actions in applications.