Undo, Redo, and Back: Stacks and Queues in the UI
LIFO and FIFO made concrete in the interfaces you build every day: undo/redo as two mirrored stacks, the classic bug where a fresh edit must clear the redo stack, the browser's Back button as a history stack, a render/task queue as FIFO, and a deque-backed "recent items" list. Every code trace is verified by running it in Node.
Questions
- Not answered. Undo modeled as a stack: which edit is undone first?
- Not answered. Which array operations turn a JS array into a FIFO queue?
- Not answered. Pressing Undo moves the popped operation where?
- Not answered. The classic bug: a fresh edit after Undo
- Not answered. Back, then a new link: what happens to forward history?
- Not answered. What does a breadcrumb trail actually represent?
- Not answered. Stack and queue operations and terminology
- Not answered. Which of these behave like a stack (LIFO)?
- Not answered. Bounded history and a recent-items deque
- Not answered. Name the double-ended structure