Counting steps, not seconds
A stopwatch tells you how fast one program ran on one machine. It says nothing about what happens when the input is ten times bigger.
Big-O counts basic steps as a function of the input size n. Here n = 8, and every cell is one item an algorithm might have to look at.
What changed
- +4
- +9
- +2
- +7
- +5
- +1
←→ step · R replay · Space play