Quiz — Lecture 22
Section A from memory, one line each. Section B shows your reasoning - marks are for method, not final answers. Answers are discussed in class; the exit ticket goes on a card.
Section A
A1. What two parts must every recursive function have?
A2. What proves a recursion terminates?
A3. Why is power-by-halving O(log n)?
A4. What are overlapping subproblems?
Section B
B1. Trace dsum(49206): calls and unwind.
B2. ways(8) = ? and what does memoisation change (conceptually)?
Exit ticket
Answer one of these on your card in 60 seconds (choose any one):
- What grounds a recursion?
- When does a table beat the tree?
- What did cs-087 buy with halving?
Homework
- Before: skim the four student pages; attempt case 1 on paper.
- After: write a five-line pseudocode solution for any case you did not
- Enrichment (optional): the stretch question on each case page.