Rubric — Assignment 5 (20 marks)

Applies to Assignment 5. Band descriptors per criterion; award half-bands where genuinely between.

Problem 1 — The overdue sweep (10)

CriterionBandDescriptor
(a) Two approaches + costs4Two genuinely different structures (map-pass vs sort-group, or streaming vs batching); costs stated with input-size arithmetic (not just "O(n)" — say what n is here and what the constant work is).
2–3Two approaches named but one is a re-skin of the other, or costs without the size arithmetic.
0–1One approach, or costs asserted from memory.
(b) Choice justified3The justification cites the student's own (a) numbers and a workload fact (10,000 entries, nightly run) — including a defensible "either is fine at this size" verdict with a reason.
1–2Choice made on vibes ("hashmaps are fast") without the arithmetic.
(c) Invariant + end argument2Invariant is checkable (e.g. "after processing entry i, the map holds the exact totals for the entries seen so far") and the end-argument uses loop exit.
0–1Restates the code, or an invariant that is false mid-loop.
(d) Tie test1A concrete input with two equal maxima and the expected two-member output.

Problem 2 — The seating swap (10)

CriterionBandDescriptor
(a) Formulation + space size3Candidate = an assignment of desks (occupied/empty); worst-case space given exactly (e.g. 2^(n²) assignments or C(n², k) for exactly-k) with the arithmetic.
1–2"Try all seatings" without a size, or a size that miscounts.
(b) Backtracking + pruning4Correct recursion with base case; pruning rule stated and safety-argued (pruned branches provably contain no solution). Correct code with a false safety argument earns 2 — the argument is the mark.
2Works but prunes nothing, or prunes by a rule that can discard solutions.
0–1Not recursive, or not runnable.
(c) Node counts2Real instrumented numbers for all six runs (3 sizes × on/off); growth sentence matches the numbers.
1Numbers for some runs, or a growth sentence contradicted by the table.
(d) C(n²,k) comparison1Credit for the honest answer: when k is small and the rule-check is expensive per candidate, enumerate-and-test beats deep search with cheap checks.

Cross-cutting modifiers