Start here
Start here: how to use the notes and the four study modes.
Beginner-friendly notes for CS332 Design and Analysis of Algorithms. Everything here is rewritten in plain words, with a citation pointing back to the lecture slides and to CLRS (4th ed.).
Midterm: Monday 2 November 2026
Covers topics 0–8. Schedule and plan: Study plan · Where I am now: Progress
How to use a topic page
Every topic page offers four study modes as tabs. Pick the one that suits you today. If it isn't clicking, switch to a different tab rather than re-reading the same one.
| Mode | Use it when… |
|---|---|
| Visual | you want to see it: trace tables, diagrams, step-by-step pictures |
| Worked example | you want one concrete problem solved slowly, then the rule |
| Guided questions | you want to figure it out yourself with hints (answers are hidden) |
| Explanation & drill | you want a straight explanation, then practice problems |
The site remembers the tab you choose (pick "Visual" once and every page opens on Visual).
Every topic ends with a Mastery check: a fresh problem to solve without hints. A topic is done only when you can solve it and explain it in your own words.
Topics
| # | Topic | Why it matters for the midterm |
|---|---|---|
| 0 | Math toolkit | Logs and sums show up in every analysis |
| 1 | Algorithms & counting steps | Turning code into T(n) |
| 2 | Proof techniques | Induction and contradiction are the backbone of every proof question |
| 3 | Loop invariants & correctness | "Prove this algorithm is correct" |
| 4 | Insertion sort | Trace + invariant + best/worst case in one algorithm |
| 5 | Loop analysis & space | Fast rules for nested loops |
| 6 | Big-O, Ω, Θ | "Prove f(n) = O(g(n)) with c and n₀" |
| 7 | Divide & conquer + merge sort | The first recursive algorithm |
| 8 | Recurrences | "Solve T(n) = 2T(n/2) + n" |
Toolbox
- Cheatsheet: every formula on one page
- Which technique?: how to recognise which approach a question wants
- My mistakes: a log of errors so I don't repeat them
- Self-study session: how to learn a topic on your own, with the explain-back checklist
- Mock midterm A and B: timed exam mode