Back to library

📈Big O Intuition

Stop treating Big O as math you memorized for an interview — build the intuition to spot O(n²) disasters, pick the right data structure without thinking, and rewrite a slow function from O(n²) to O(n) in under five minutes.

Foundations14 drops~2-week path · 5–8 min/daytechnology

Phase 1What Big O Actually Measures

See what Big O measures and what it quietly ignores

4 drops
  1. Big O measures how bad it gets, not how slow it is

    6 min

    Big O measures how bad it gets, not how slow it is

  2. The magic trick is that size doesn't matter

    6 min

    The magic trick is that size doesn't matter

  3. One loop, one pass, one proportional pile of work

    6 min

    One loop, one pass, one proportional pile of work

  4. Every nested loop is a warning sign

    7 min

    Every nested loop is a warning sign

Phase 2Eyeballing Complexity in Real Snippets

Eyeball the complexity of twenty small snippets fast

5 drops
  1. Count the loops, check what's inside

    6 min

    Count the loops, check what's inside

  2. The expensive operation is the one you didn't notice

    7 min

    The expensive operation is the one you didn't notice

  3. Half the work, then half again, then you're done

    6 min

    Half the work, then half again, then you're done

  4. Sort once, then the rest gets easier

    7 min

    Sort once, then the rest gets easier

  5. Time is cheap; memory is where you really pay

    7 min

    Time is cheap; memory is where you really pay

Phase 3Complexity Drives Data Structure Choice

Choose lists, sets, and dicts by complexity, not habit

4 drops
  1. The membership check on the wrong structure cost a weekend

    7 min

    The membership check on the wrong structure cost a weekend

  2. The lookup table that kept getting slower

    7 min

    The lookup table that kept getting slower

  3. The task queue that slowed down as the backlog grew

    7 min

    The task queue that slowed down as the backlog grew

  4. Two lists, one primitive, and the miracle of O(n + m)

    6 min

    Two lists, one primitive, and the miracle of O(n + m)

Phase 4Rewrite a Slow Function You Own

Find a real slow function and rewrite it faster

1 drop
  1. Find a slow function, identify its class, rewrite it faster

    8 min

    Find a slow function, identify its class, rewrite it faster

Frequently asked questions

What is Big O notation in plain English?
This is covered in the “Big O Intuition” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
Why do we drop constants and lower-order terms in Big O?
This is covered in the “Big O Intuition” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
What's the difference between O(n) and O(log n)?
This is covered in the “Big O Intuition” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
When does O(n²) actually matter in real code?
This is covered in the “Big O Intuition” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.
How do I know when to use a set instead of a list?
This is covered in the “Big O Intuition” learning path. Start with daily 5-minute micro-lessons that build from fundamentals to hands-on application.