The Runtime Theory

How Arrays and Linked Lists: Cost Follows Access Pattern works

An interactive concept flow for arrays and linked lists: cost follows access pattern, from its assumptions through the main operation and boundary checks.

The Runtime Theory Team05 stages

trace / request.md

CONTRACTREPRESENTATIONOPERATIONBOUNDARYRESULT

readyAn array stores elements in contiguous indexed positions. This makes locating element i a direct address calculation and often keeps nearby values close in cache. A linked list stores each value alongside a reference to another node, which makes traversal follow pointers instead of predictable offsets.

Use the stages in order to explain arrays and linked lists: cost follows access pattern. Each stage makes one assumption visible: what the operation promises, what representation it uses, how state changes, which boundary can invalidate a shortcut, and what evidence confirms the result.

For a worked explanation, continue to the topic article and execution trace.

Not started

Sign in to save your learning progress.

Sign in to save