172: DSA - Timed Unseen-Problem Checkpoint
Assessment
Complete two unseen problems in 45 minutes. Before coding, clarify assumptions, state a brute-force approach, choose a pattern, write the invariant, and estimate complexity.
Required evidence
- runnable solution with focused tests;
- a clear explanation of rejected approaches;
- complexity stated for time and space;
- edge cases tested before the happy path;
- retrospective naming the recognition clue and remaining weakness.
Exit rule
Do not measure success by memorized problem count. Continue when you can communicate a correct approach and recover from a failed test.
Suggested exam
Use one array problem and one graph/DP problem unknown to the learner. Spend 5 minutes clarifying, 5 on examples and brute force, 20 coding, 10 testing/debugging, and 5 explaining. A useful prompt pair is “longest subarray with at most K distinct values” and “course schedule with a returned order.” Require the learner to identify when a familiar sliding window or topological-sort assumption does not apply.
Test expectations and rubric
The test set must include empty input, minimum size, duplicate values, boundary limits, invalid input if specified, and one adversarial case. Score each problem out of 10: 2 contract/examples, 2 pattern and invariant, 3 correct implementation, 1 complexity, and 2 edge-case debugging. Pass at 16/20 with no unexplained correctness failure; otherwise record the exact failed assumption and retest it.
Interview rubric
Pass requires a correct result for representative and edge inputs, a complexity estimate, an explanation of the invariant, and a clear correction after at least one deliberate test. A partial solution with honest reasoning is more useful than copied code that cannot be defended.
Required matrix prompt
Use one checkpoint prompt involving a grid: return the number of islands or traverse a matrix in spiral order. Before coding, state whether diagonal movement is allowed, whether input may be ragged, whether mutation is allowed, and what an empty input means. The review must mention bounds, visited state, complexity, and the smallest failing test.
