Lesson 1 of 5
GROWTH SAND TABLE
Increase n and watch the work spread
EVERY PAIR
Each stone is compared with every other stone.
growth model25 work
ONE PASS
Visit each stone once and remember what you saw.
growth model5 work
Big O focuses on the shape of growth. Constants and small details matter less once n becomes large.
Two stones in this field sum to exactly 9. The naive hunt checks every pair. When n doubles, the number of possible pairs grows by about four times. Big O calls this O(n²), or quadratic time.
Your call · An O(n²) pair hunt grows from n = 10 to n = 20. About how much work should you expect?