Big-O Intuition

Reason about how work grows with input size.

Lesson 2

Concept

Constant, linear, log, and quadratic patterns cover most beginner code. Favor linear passes; beware nested loops over large data.

Try it

Order from fastest to slowest (as n grows)

These steps are out of order — can you fix them?

1.O(n log n)
2.O(1)
3.O(n^2)
4.O(n)