← Quiz: STL Containers: all 9 questions
Quiz: STL Containers · Question 6 of 9
Which container should you use for "undo" in a text editor, where the last action is undone first?
Which container should you use for "undo" in a text editor, where the last action is undone first?
- A.queue
- B.stack
- C.set
- D.priority_queue
Answer & explanation
Correct answer: stack
Last in, first out is exactly how a stack works.
Can you get the rest right without peeking?
Take the timed Quiz: STL Containers quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →