In which scenario would you prefer a stack over a queue?
-
When you need to process items in FIFO order
-
When you need to backtrack through previous states
-
When you need to store items for later retrieval
-
When you need to manage multiple tasks simultaneously