DAA Study Hub

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.

ModeUse it when…
Visualyou want to see it: trace tables, diagrams, step-by-step pictures
Worked exampleyou want one concrete problem solved slowly, then the rule
Guided questionsyou want to figure it out yourself with hints (answers are hidden)
Explanation & drillyou 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

#TopicWhy it matters for the midterm
0Math toolkitLogs and sums show up in every analysis
1Algorithms & counting stepsTurning code into T(n)
2Proof techniquesInduction and contradiction are the backbone of every proof question
3Loop invariants & correctness"Prove this algorithm is correct"
4Insertion sortTrace + invariant + best/worst case in one algorithm
5Loop analysis & spaceFast rules for nested loops
6Big-O, Ω, Θ"Prove f(n) = O(g(n)) with c and n₀"
7Divide & conquer + merge sortThe first recursive algorithm
8Recurrences"Solve T(n) = 2T(n/2) + n"

Toolbox

On this page