← Data structures

A stack of books

The books are in a clear box. You can see every spine through the sides, but the only way to take a book out is through the open top. A stack works the same way.

Code and step-by-step playback →

Your book pile

Books in the box 3
❧✧✦
Garden
≈✧✦
Ocean
✦✧✦
Space
Your goal is to get Ocean out of the box. Which book will you take first? Tap it.

What will you do?

How an editor undoes a change

A designer changes the date and time on a poster. Before each edit, the editor puts the previous version on a stack. Undo takes the top version off the stack and puts it back on screen.

Museum NightMay 18 · 15:00

Change the date, then the time. Press Undo edit. Which part of the poster changed back?