awesome-everything RU
↑ Back to the climb

Algorithms from zero

Thinking & complexity: free-recall review

Crux Free-recall prompts across the complexity unit. Answer each in your own words first, then reveal the model answer and compare.
Your altitude — climbing toward senior
ZeroJuniorMiddleSenior
You are at middle altitude — in the sky
◷ 14 min

Retrieval beats re-reading. For each prompt, say or write a full answer from memory before you open the model answer — the effort of pulling it out is what makes the idea stick.

Goal

Reconstruct the unit’s spine — why we count steps, what Big-O keeps and drops, the complexity-class ladder, the time-space tradeoff, and how constraints pick your approach — without looking back at the lessons.

Recall before you leave
  1. 01
    Why do we measure an algorithm by its growth rate (Big-O) instead of by its wall-clock time?
  2. 02
    State the rule for finding the Big-O of a step count, and apply it to 3n² + 100n + 50.
  3. 03
    How do you combine complexities for sequential code versus nested loops, and why is the difference so large?
  4. 04
    Name the common complexity classes from fastest to slowest and where the practical cliff is.
  5. 05
    Explain the time-space tradeoff with the duplicate-detection example, and how you decide which side to take.
  6. 06
    How does the input constraint n tell you which complexity to aim for, with one worked example?
Recap

If you could reconstruct each answer from memory, you hold the unit’s spine: we measure growth not wall-clock; Big-O keeps the dominant term and drops constants; sequential phases add while nested loops multiply; the class ladder runs O(1) to O(n!) with the practical cliff at O(n²); time and space trade against each other and the binding constraint decides; and the input bound n maps straight onto the complexity you must hit. Estimate the cost before you run anything.

Continue the climb ↑Thinking & complexity: code reading
shortcuts expand
search
K
prev piece
k
next piece
j
cycle tier
t
this menu
?
sources3
expand
  1. 01
  2. 02
  3. 03

Trademarks belong to their respective owners. Editorial reference only.