Part III · Chapter 8

Shelving & Linking

A giant wall of memory drawers is only as helpful as the way you arrange what lives inside. Here are three timeless ways to keep things tidy—and the hidden trade-offs of each.

Back in Chapter 4, we built a grand hallway of memory drawers that could hold onto lamp patterns for as long as the lights stayed on. Now imagine you have ten thousand of those drawers, filled with recipes, names, scores, and songs. If you toss everything into whichever drawer happens to be open, your giant memory wall turns into a messy attic. Finding a single item means opening drawers one by one until you get lucky.

Good organization is not just about neatness—it changes what is effortless and what is painful. Over time, humans settled on three wonderfully clear ways to arrange things in memory, and you already know all three from everyday life.

1. Numbered Lockers in a Tight Row

Picture six school lockers standing shoulder to shoulder, numbered #1 through #6. Every item sits right next to its neighbor with zero gaps in between. Need whatever is inside locker #4? You do not have to peek into #1, #2, or #3. You walk straight to door #4 in a single hop.

That direct jump feels magical—until you want to squeeze a new item right into the middle of the row. Suppose your lockers hold Apple, Bread, Cheese, Dates, Figs, and you want to slip Berry into locker #2 so everything stays tidy. Because the lockers are packed tight, Figs has to scoot to #6, Dates has to scoot to #5, Cheese to #4, and Bread to #3 just to open up a single slot. Adding one item in the middle makes the whole row shuffle down the hallway.

2. The Scavenger-Hunt Paper Chain

Now try a completely different idea. Instead of forcing every item to stand side by side, scatter them into any empty drawers around the building. On the back of each note, write a tiny clue pointing to the next one: "Apple (Room 12) → next is Room 47."

Suddenly, slipping Berry between Apple and Bread is effortless. Drop Berry into any free room—say Room 99—and simply re-tie two strings: point Apple to Room 99, and point Room 99 to Bread. Nobody else has to move an inch! The catch? If you want the fourth item in the chain, you can no longer jump straight there. You have to start at the first note and follow the scavenger-hunt clues one by one.

Lab 1 Lockers vs. Paper Chain

Run the exact same job on both arrangements and compare the footsteps each one takes.

Row of Numbered Lockers Steps: 0
Scavenger-Hunt Paper Chain Steps: 0
Try Jump to Item #4 first, then reset and try Insert "Berry" at #2. Notice how each arrangement shines at one job and struggles at the other!
No Single Winner

Lockers win when you need instant jumping by number. Paper chains win when you are constantly slipping new items into the middle. Choosing the right shelf depends on the job you do most often.

3. The Branching Signpost Village

There is a third arrangement that feels like a clever park map. Imagine a village of numbered cottages connected by branching garden paths. At the very top stands the central square, Cottage #40, with a wooden signpost pointing down two forks: smaller numbers to the left, larger numbers to the right.

Every cottage along the way has the same simple signpost rule. If you are looking for Cottage #50, you start at #40. Since 50 is larger than 40, you turn right—instantly ignoring the entire left side of the village! You arrive at #60. Since 50 is smaller than 60, you turn left—and there is #50, in just three quick hops.

Compare that to walking down a single straight street of seven cottages and knocking on doors from #10 all the way up to #70. On a branching signpost map, every single turn leaves roughly half the remaining village behind. Click any house below to watch the walker race both routes.

Lab 2 The Branching Signpost

Pick any target house (or click a house directly) to watch a walker follow the left/right signposts in at most 3 hops.

Find house:
← smaller larger → 40 20 60 10 30 50 70
Compare: Walking a 7-House Street One by One Signpost: 0 hops · Street: 0 doors
Click any house number above—try #70 to see the biggest difference between following signposts and walking door to door!

Notice how every extra layer of branching doubles how many houses you can organize while adding only one single signpost hop to your walk. A map with just ten layers of signposts can hold over a thousand houses—and you can still reach any front door in ten quick turns.

Quiet footnote: In computer science, these shelf-and-clue blueprints are called data structures. A tight row of numbered lockers is an array. A scavenger-hunt paper chain is a linked list. And our left-for-smaller, right-for-larger signpost map is a binary search tree.

What You Just Built