Lesson 1 of 4
GROWTH SAND TABLE
Increase n and watch the work spread
ONE LOOP
One pass across n values.
growth model5 work
TWO NESTED LOOPS
Up to n steps for each of n steps.
growth model25 work
Big O focuses on the shape of growth. Constants and small details matter less once n becomes large.
A loop inside a loop often creates O(n²) work. For every one of n outer steps, the inner loop can perform n more steps.
Your call · If n doubles, about how much can O(n²) work grow?