← Linked Lists · guided lesson

Linked Lists

1 / 19 · story

the story

Singly linked list

Every tool here exists because something was too slow or broke without it. Here is what.

1956 · Allen Newell, J. C. (Cliff) Shaw and Herbert A. Simon

In 1956 Newell, Shaw and Simon were building the Logic Theory Machine, a program that searched for proofs in logic. Its data grew in shapes and sizes nobody could predict, so a fixed block of memory per list would either overflow or sit half empty. Their fix: each memory cell points to the next one, and new cells come from a shared pool of free cells — the first list-processing languages (IPL). A 1960 paper already named the price: the links ate about half the fast memory, and reaching the k-th item got slow.

the problem it solved

Storing data whose size and shape you can't know in advance, without reserving big fixed blocks that overflow or sit empty.

why it matters: without it

Every growing, splicing structure would need big up-front arrays and O(n) shifts — no cheap hash-table chains, free lists or O(1) cache eviction.

sources: Newell & Shaw — Programming the Logic Theory Machine (Western Joint Computer Conference, 1957) ↗ · Gelernter, Hansen & Gerberich — A FORTRAN-Compiled List-Processing Language (Journal of the ACM, 1960) ↗ · IEEE Computer Society — Herbert A. Simon, Computer Pioneer ↗

also in this chapter: Dummy head (sentinel node) · In-place reversal (prev / curr / next) · Fast & slow pointers (Floyd's cycle detection) · Doubly linked list + HashMap (the LRU cache)