Repository navigation
Advanced Algorithms: rounds 1 to 7 of Build in iterations - #68
Merged
Merged
Conversation
Round 2 (source fidelity) for M0. Fix the lab's growth-rate problem, which lists n^(log n), not n log n. Add the min-max merge trace with the lab sheet's last row corrected, the insertion sort trace, the full average case when the key may be missing, and the notes' 2n + 3 count. Point out the lab code's slips and the two typos in the lecture code.
Tracks the Build in iterations rounds per module, with round 2's M0 report.
Round 2 (source fidelity) for M1. Write out the quicksort partition, counting sort and radix sort traces that were only in the visualizers, name Lomuto's partition and Karatsuba's algorithm, finish the select example, and note the slide and lab slips. Tick M1 in the checklist.
Round 2 (source fidelity) for M2. Fix the free-slot count in the stuck quadratic probing example and the probe-count claim in the hashing lab. Add the lecture's three red-black deletion examples with a test that checks their final trees, open-addressing rehashing, and the chaining vs. open addressing comparison. Tick M2 in the checklist.
Round 2 (source fidelity) for M3. Run both MST visualizers on the lecture's Prim graph, write out the lecture's directed BFS example, the C(6, 3) and knapsack tables, and answer the two open greedy exercises. Tests pin the MST orders and the BFS order. Tick M3.
Round 2 (source fidelity) for M4. Answer the 3-variable SAT and clique questions, note the slide's mismatched SAT table, and count distinct TSP tours. Round 2 is now complete.
Round 3 (depth) for M0: insertion sort's best case, where binary search's counts and fib's doubling come from, the base case of the binary search proof, and a common-mistake callout in every lesson.
Round 3 (depth) for M1: a worked Gauss multiplication, Strassen's saving in numbers, why equal keys and MSD-first radix sort hurt, and a common-mistake callout in each lesson.
Round 3 (depth) for M2: a worked mid-square hash, the potential method's arithmetic, the red-black height induction step, and a common-mistake callout in each lesson.
Round 3 (depth) for M3: counterexamples for greedy coin-row, wrong activity-selection rules and Dijkstra with a negative edge, plus subsequence vs. substring and the usual MST slips.
Round 3 (depth) for M4: why input length means digits (trial division is exponential), what NP does not mean, and which way a reduction goes. Round 3 is now complete.
Round 4 (plain language) for M0: split the long sentences, replace 'in terms of', and explain 'subroutine' and 'nondecreasing' where they first appear.
Round 4 (plain language) for M1: split the long sentences in all five lessons. Part of STACK-42#65
Round 4 (plain language) for M2: split the long sentences in all seven lessons and drop filler words. Part of STACK-42#65
Round 4 (plain language) for M3: split the long sentences in all five lessons, replace hedge words, and give the scheduling example's reasons once. Part of STACK-42#65
Round 4 (plain language) for M4: split the long sentences and simplify the definition of a reduction. Round 4 is now complete. Part of STACK-42#65
Round 5 (visualizations) for M0: MinMaxVisualizer gets a second mode for the lab's Algorithm 2, with a test. Array cells now honour reduced motion. Part of STACK-42#65
Forks don't have GitHub Pages set up, so the deploy workflow's Setup Pages step failed on every push to a fork. Run the build job only in STACK-42/decoded; the deploy job depends on it and is skipped too.
Round 5 (visualizations) for M1: a new VlsiLayouts diagram compares the obvious tree layout with the H-tree, with a test, and the quicksort stepper runs on equal keys. Part of STACK-42#65
Round 5 (visualizations) for M2: a LoadFactorChart compares 1/(1 - a) with 1 + a. The hashing lab points at the visualizer's probe counter again, with a test that it gives 16, 23 and 16. Part of STACK-42#65
Round 5 (visualizations) for M3: GraphTraversal can draw directed edges with arrowheads and show node names in its messages, queue and order. The shortest-paths lesson runs it on the lecture's a to i graph. Part of STACK-42#65
Round 5 (visualizations) for M4: a PvsNpDiagram toggles between P != NP and P = NP, with example problems in each class and NP-hard reaching outside NP. Round 5 is now complete. Part of STACK-42#65
Round 6 (practice) for M0: every lesson ends with midterm questions (part 1) and final questions (part 2). Multiple choice uses Quiz, which gets a practice mode that saves nothing; written questions use a new ModelAnswer button. Part of STACK-42#65
Round 6 (practice) for M1: midterm and final questions after every lesson, with model answers and practice quizzes. Part of STACK-42#65
Round 6 (practice) for M2: midterm and final questions after every lesson, including the three hash-table exercises and the 2023 red-black insertion with a test. Part of STACK-42#65
Round 6 (practice) for M3: midterm and final questions after every lesson, including the 2023 midterm's 16 Prim and Dijkstra questions rebuilt from the scan, and the 2018 final's MST, Dijkstra, Huffman, robot and red-black questions. Part of STACK-42#65
Round 6 (practice) for M4: ten final-exam questions on P, NP and NP-completeness, plus coin-change and Dijkstra questions from the same finals in the greedy and shortest-path lessons. Round 6 is now complete. Part of STACK-42#65
Round 7 (connections): 18 links from lessons to where their ideas are taught, the course added to five tools on the tools page, and two new tools (routing, diff and Git). Part of STACK-42#65
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of #65.
Runs the Advanced Algorithms & Analysis course through rounds 2 to 7 of Build in iterations. Each module of each round is its own commit, so the PR can be reviewed commit by commit. The checklist and every round's full report (what changed, source errors, what was left out) are in
docs/iterations/advanced-algorithms.md(new) and posted on #65.Errors fixed in the lessons
n log nwhere the lab hasn^(log n), so the given answer was wrong.What each round added
MinMaxVisualizerVlsiLayoutsdiagram (obvious layout vs H-tree)LoadFactorChartGraphTraversal, used for the lecture's BFS examplePvsNpDiagramQuiz; written questions use a newModelAnswerbutton that reveals the answer. Scanned questions (the 2023 Prim/Dijkstra MCQs and the 2018 MST, Dijkstra and robot questions) were rebuilt from the images, and every answer was recomputed.Shared code touched
Quizhas a newpracticeprop. A practice quiz saves no score and doesn't mark the lesson complete, because otherwise two quizzes in one lesson would overwrite each other's score. Existing quizzes are unchanged, and a test checks they still save scores.GraphSvgandGraphTraversaltake an optionaldirectedflag and show node labels. Algorithm Design and Analysis uses the defaults and looks the same; its tests pass..github/workflows/deploy.yml: the build job only runs inSTACK-42/decoded. Before this, the Pages deploy failed on every push to a fork, because forks don't have Pages set up.Quiz practiceandModelAnswer.Tests
New tests cover:
ModelAnswerand practice quizzesnpm run lint(0 errors), the course, link, tools and algorithm tests, andvite buildpass. The 4 failures inlesson-preview.test.tsalso fail onmainwithout these changes.Not done