Tonight's goal: choose your three weakest graph problems, name the node, edge, and traversal in under 2 minutes, then re-solve from a blank file with no hints.
Re-solve your weakest problems from a blank file with no hints; a problem only counts as revised when it compiles and passes on the first or second run.
0:00-0:05 — Warm up, choose, start. Answer the MCQs fast, pick your three weakest from the menu, open a blank file for the first problem, and start solving by minute 5.
Each problem, 0:00-0:02 — Speak first. Say the node, edge, traversal or data structure, brute force, and target complexity before typing.
Each problem, 0:02-0:27 — Attempt cold. Code from memory only. Do not open notes, stored code, hints, comments, or videos.
Each problem, 0:27-0:32 — Run twice. Submit or run at most two times. A later pass is useful practice, but it is not revision credit.
Each problem, 0:32-0:35 — Log honestly. If it passes, tick revision done. If it fails, write WA: <root cause> and keep it in the queue.
Final 5 minutes — Gate. Run the self-check below. Any miss chooses the next revision target.
The problem menu
Pick your 3 weakest from this menu. Re-solve from a blank file, no hints. Before each solve, run the 2-minute drill: node, edge, traversal choice.
Cap this at 5 minutes. Missed answers are signals for today's weak list.
1. Which invariant belongs to Number of Islands?
"DFS floods everything reachable in one component; count how many times you must start a new flood. The grid itself is the adjacency list — mark visited in place."
2. A cycle creates repeated copies. Which invariant prevents it?
"A hashmap from original node to its clone doubles as the visited set — create the clone on first visit, reuse it ever after."
3. A Course Schedule cycle leaves what signal after Kahn's peel?
"A dependency order exists iff the directed graph has no cycle — detect it with three-color DFS or Kahn's in-degree peeling."
4. A solution starts downhill from every cell. Which invariant was missed?
"Instead of asking where each cell drains, flood inward from each ocean and intersect the two reachable sets."
5. Before BFS on Word Ladder, what must be named?
"First decide what a node and an edge are — here words, one letter apart — then BFS finds the shortest unweighted path."
6. Why does Network Delay Time need Dijkstra instead of plain BFS?
"Dijkstra is BFS with a priority queue: always settle the closest unsettled node, because no cheaper path to it can appear later."
Self-check gate
Pass bar
Pass tonight only if all three are true:
For all six menu problems, you can say the node, edge, and traversal choice in under 2 minutes each.
For your three selected problems, the blank-file solution passes on run one or run two.
For every miss, your log names the exact failed invariant, not just "implementation bug."
Failure path: do not mark revision done. Add the failed problem to the next revision queue, write WA: <root cause>, and compare only after the two-run test is over.