Stacks
Stacks: Undo the Last Thing First: Stacks, Redo, the Back Button and Matching Brackets: Stacks at Work.
Updated
- Undo the Last Thing First: Stacks (Apprentice): An editor has to take back its most recent change first, then the one before, after 10,000 edits as quickly as after 10. Find a structure that keeps undo instant, and learn why it does less than a list on purpose: the stack.
- Redo, the Back Button and Matching Brackets: Stacks at Work (Apprentice): Three everyday features need the most recent thing first: redo, a browser's back and forward buttons, and checking that brackets match. See why throwing things away, searching and counting fall short, and solve all three with stacks.