Bowls come out numbered from 1. Park them on the bowl pile or in the waiting line, and serve them in ticket order.
This is secretly practice for a real IT job.Tap to see the answer
| Bowl | Data |
|---|
| Bowl pile | Stack (last in, first out: LIFO) |
|---|
| Stack / Take top | push / pop |
|---|
| Waiting line | Queue (first in, first out: FIFO) |
|---|
| Line up / Take front | enqueue / dequeue |
|---|
| Ticket order | The order you need the data in |
|---|
It’s really a stack and a queue: the two basic ways a computer holds data for a while.
Why play this?Mix up “take from the top” and “first come, first served,” and the plates topple or customers get angry. Practice using the two spots the right way.
Piles: a stack of plates, books piled on a desk, the layers of a burger.
Lines: a checkout line, a conveyor-belt sushi lane, cars in a tunnel.