Big-O notation.
Not how fast something is today, but how the work grows as the line gets longer.
- They’re basically the same?1
On a tiny input every approach looks fine — the piles are all small.
- 2
O(1): the pile never grows. A lookup by position costs the same at any size.
- 3
O(log n): the pile barely creeps up. Each step halves what’s left (binary search).
- 4
O(n): double the input, double the pile. A straight scan of the list.
- It’s off the chart!5
O(n²): the pile explodes. A loop inside a loop — 1k items ≈ a million steps.
- 6
On real, large data only the slow-growing shapes are still standing.
Semicolony semicolony.dev/eli5/big-o/comic