Skip to content

Exams phase 4b: Advanced Algorithms question bank (80 questions) - #63

Open
A7med7x7 wants to merge 1 commit into
autopilot/exams-4-os-bankfrom
autopilot/exams-4b-aa-bank
Open

A7med7x7 wants to merge 1 commit into
autopilot/exams-4-os-bankfrom
autopilot/exams-4b-aa-bank

Conversation

@A7med7x7

@A7med7x7 A7med7x7 commented Nov 5, 2026

Copy link
Copy Markdown
Member

Exam phase 4b (docs/exams.md): an Advanced Algorithms question bank.

Stacked on #62 → #59 → #58 → #53. This PR targets #62's branch, so the diff shows only this phase.

Why

Advanced Algorithms, the largest course (24 lessons), had no quizzes and no questions, so its exam page was empty and none of it could reach the review queue. With this and #62, the two gaps the exam plan called out are closed.

What's in it

src/content/advanced-algorithms/questions.ts: 80 questions, about 4 per taught lesson and 2 per lab, across all 5 modules. Every one sets lesson and section.

  • Analysis: worst/best/average case, every-case complexity, Big-O proofs and rules, growth order, Θ.
  • Recurrences: one master-method question per case (4T(n/2)+n, 9T(n/3)+n², 2T(n/2)+n² with regularity), binary search, uneven recursion trees, 3-way merge sort.
  • Divide and conquer: powering, Strassen, Gauss, quicksort worst/randomized/almost-best, the decision-tree lower bound, counting and radix sort, randomized and median-of-medians SELECT.
  • Hashing: division method, why prime, amortized doubling (≤ 3n), accounting, chaining 1 + α, linear, quadratic and double probing traces, 1/(1 − α) probes.
  • Trees: red-black properties, the 2 lg(n + 1) height bound, rotations, why new nodes are red, rank via sizes, interval trees' m[x], skip lists.
  • Design strategies: coin row, LCS, 0/1 knapsack, overlapping subproblems, greedy failure, the cut property, Kruskal and Prim bounds, Huffman cost, prefix codes, activity selection, Dijkstra trace, negative cycles, BFS for unweighted graphs.
  • NP: NP by verification, NP-complete = NP ∩ NP-hard, which direction a reduction goes, Cook–Levin, P = NP consequences.

How it was checked

  • Calculations worked again by script, with fresh inputs instead of the lessons' own examples, which are textbook classics (e.g. coin row 3, 8, 4, 1, 9, 2 → 17; LCS of AGGTAB/GXTXAYB → 4; knapsack → 65; probing traces → slots 2, 4, 7; Huffman → 14 bits; Dijkstra → 4).
  • Claims checked against the lesson text: the master-method cases and regularity condition, α = n/m, 1/(1 − α), h ≤ 2 lg(n + 1), the m[x] definition, "no bad sequences" for skip lists, the Prim/Kruskal bounds, NP-complete = "both in NP and NP-hard", Cook–Levin, and the lab's Θ(b) vs halving for aᵇ.
  • question-bank.test.ts confirms every section is a real heading.
  • exam-page.test.tsx: its "course with no questions" example moves to Computer Literacy, which still has no bank.
  • npm run lint (0 errors), tsc, npm run test (54 files, 2,455 tests), build. In a browser: the AA exam draws 20 questions from all 5 modules, scores each module, and gives every miss a "Re-read" link, with no page errors.

Where exams stand after this stack

Every course with quizzes or a bank now has a working exam, except Computer Literacy and The Exam Mind (3 and 4 lessons, no questions yet). Next in phase 4: 4c (at least 4 questions per taught lesson everywhere) and 4d (tag the 259 migrated questions with their lessons).


Generated by Claude Code

Exam phase 4b (docs/exams.md). Advanced Algorithms (24 lessons) had no
quizzes, so its exam page had no questions. It now has 80, each tagged
with the lesson and section that teaches it.

Calculation questions use fresh inputs, worked again by script: master
method cases, division hashing, linear, quadratic and double probing,
chaining and open-addressing probe counts, the red-black height bound,
coin row, LCS, 0/1 knapsack, Huffman cost, activity selection and
Dijkstra. The exam-page test's example of a course without questions
moves to Computer Literacy.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EC6Zzt5akQu7TEHdGquZzp

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants