cconnected.
Understand the pattern. Find your own way.Find your starting point
Back to your feed

Find the missing connection

Try these before studying. For each, write a proposed approach, the fact that makes it fit, and one changed rule that would invalidate it. No code needed. Allow 10–15 minutes or split across sessions. An unfamiliar algorithm name is less important than the reasoning.

Questions

  1. A building has rooms and two-way corridors. Every corridor takes one minute. Find the fewest minutes from entrance to exit. What should determine exploration order?
  2. The same building now has corridor times of 1, 4, or 20 minutes. Does your previous exploration order still work?
  3. You are at square (2, 3) on a board. In one journey you have already used your only wall-removal token; in another you still have it. Can both journeys share one cached answer for the remaining route?
  4. A binary tree asks for the largest number of nodes on a root-to-leaf path. What should each child return to its parent?
  5. List every subset of five distinct items. If two partial choices have considered three items, may you discard one simply because their next index matches?
  6. Count ways to move only right or down across a rectangular board. Why can an answer for a square be reused, and why does recursion terminate?
  7. Choose as many non-overlapping appointments as possible. Someone proposes “take the earliest starting appointment.” Find a counterexample.
  8. Search a dictionary repeatedly for all words that begin with a given prefix. What shared work might a useful representation preserve?
  9. Find the longest contiguous subarray with sum at most 5. You can remove values from the left when the sum gets too large. What input property would make this safe, and what breaks without it?
  10. A DP function has arguments (item_index, capacity), but its optimized code uses a one-dimensional list. How many logical coordinates describe the subproblem?
Reveal reasoning and where to go next
  1. Explore by distance layers using BFS. Every move adds the same amount, so first discovery gives a minimum number of edges. See 11.
  2. Edge count no longer determines travel time. With these nonnegative weights, Dijkstra processes the smallest tentative total cost. See 32.
  3. No: the legal future choices differ. The state needs the token status or remaining budget. See 01, 18, and 26.
  4. A child returns its subtree height. A node returns one plus the larger child height, with an empty child returning zero. See 07.
  5. The distinct prefixes produce distinct required outputs. A cache keyed only by next index cannot justify throwing away one prefix. You may share suffix calculations and attach them to both prefixes, but must still emit every requested subset. See 14 and 18.
  6. With fixed board rules, future routes depend only on the current square. Every move increases row or column, so there is no dependency cycle. See 23.
  7. (0, 10), (1, 2), (2, 3): the earliest start yields one appointment; the two short ones fit together. See 29 and 30.
  8. A trie shares stored prefixes and permits a query to reach a prefix node before enumerating completions. Reporting many completions still costs time. See 16.
  9. Nonnegative values provide the needed sum monotonicity. For [6, -2], a window algorithm may discard 6 before discovering the valid length-two sum 4. See 04.
  10. Two logical coordinates. A one-row representation reuses memory from earlier item layers. See 28.

Interpret the result

Do not turn this into a percentage grade. Identify the type of explanation that was missing:

If you struggled with…Start with…
3, 5, or 10State → recursion → DP foundations
1, 2, or 6Graph modeling → BFS → dependencies
4Recursion contracts → tree summaries
7 or 9Invariants → counterexamples → greedy proof
8Tries, then its connection to backtracking

If you could name an approach but not defend it, read the counterexample and rule-change parts of that route. If you could defend every answer, go directly to mixed practice; return to cards when a changed assumption surprises you.