# Stacks

Stacks: Undo the Last Thing First: Stacks, Redo, the Back Button and Matching Brackets: Stacks at Work.

Updated: November 17, 2026

1. [Undo the Last Thing First: Stacks](https://www.ask-codey.com/lessons/ds-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.
2. [Redo, the Back Button and Matching Brackets: Stacks at Work](https://www.ask-codey.com/lessons/ds-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.

Source: https://www.ask-codey.com/courses/data-structures/topics/ds-stacks
