Lesson 1 of 4
Learn: 3Sum
GROWTH SAND TABLE
Increase n and watch the work spread
THREE NESTED CHOICES
Try every possible first, second, and third value.
growth model125 work
ANCHOR + SENTINELS
Choose one anchor, then sweep the rest once.
growth model25 work
Big O focuses on the shape of growth. Constants and small details matter less once n becomes large.
Three suns must balance at the horizon. Brute force tries every choice for the first, second, and third value. That is O(n³), or cubic time. Doubling n can multiply the work by eight.
Your call · If an O(n³) search doubles from n = 10 to n = 20, about how much can the work grow?