Chapters 4–22 handed you the tools; this chapter wires them into a single decision tree you can walk in the first ninety seconds of any interview. Read the problem, harvest the tells, follow the branches — and arrive at a shortlist instead of a blank stare.
You now own about twenty tools. The remaining skill — the one the whole book has been sneaking into your head one 🎯 card at a time — is routing: hearing a problem you've never seen and knowing, in under two minutes, which two or three tools to audition. This chapter is that router, made explicit: one decision tree, one master table of tells, a guide to combo problems, and a drill mode to make the routing a reflex.
Nothing here is new material. Everything here is Chapters 4–22, folded until it fits on a whiteboard.
Untrained candidates read a problem once, for plot. Trained candidates read it twice: once for plot, once for evidence. On the second pass you're harvesting exactly four things, and each one prunes the pattern space:
Four harvests, maybe forty-five seconds. That's the entire input to the flowchart — and conveniently, narrating the harvest out loud is the clarify-and-restate step of the ch. 2 solve loop. Recognition and communication are the same act done audibly.
Here is the whole book as a walkable flowchart. Each question consumes one of your harvests; each answer prunes the map; four or five hops land you on a pattern leaf with its chapter and its tell. Walk it now with a problem you remember — then walk it again with one you don't. The trail of chips it draws is, word for word, the narration an interviewer wants to hear: "the input is an array… the ask is contiguous… sums with negatives… so prefix sums with a hash map."
Notice the tree's economy: the first question (input shape) does more pruning than all the others combined, which is why it's worth reading the input types in the function signature before reading the story. And notice that some leaves are honest about ambiguity — "Dijkstra or binary-search the answer" is a real fork (ch. 17 met it in Swim in Rising Water Hard), and saying the fork out loud scores better than silently picking one.
Every 🎯 card from Chapters 4–22, in one place. This is the reference page of the book — the one to re-read the night before. Read the quoted phrases out loud; you are wiring statement-phrase → pattern-name, and the wiring is auditory.
Reading the table is knowledge; spotting tells inside a paragraph of story is skill. The widget below serves real problem statements with the tells buried in plain prose. Click the phrases you think are load-bearing: real tells light up ochre and cast votes for their patterns; decoys cost you a false lead. When you've found them all, the vote tally is your shortlist — exactly the artifact the tree produces, harvested straight from the text this time.
Two habits worth stealing from this game. First: tells cluster — a statement rarely has just one, and agreement between independent tells ("minimum" + "window" + "every character of") is how you get to high confidence fast. Second: the sentence that constrains the answer ("return the minimum k such that…") is nearly always a tell, while the sentence that sets the story ("Koko loves bananas") never is. Skim the fiction; read the contract.
Chapter 3 built the machinery; here it returns as a router. The constraint line converts to a complexity budget, and the budget eliminates patterns before you've thought at all:
Constraints are most valuable as tie-breakers between surviving finalists. "Longest increasing subsequence, n ≤ 2500" — subsequence says DP, and n² fitting the budget confirms the simple table is expected, not the clever O(n log n) variant. Same words with n ≤ 10⁵? Now the follow-up is coming, and you can say so before they ask.
Mediums that feel hard are usually two Easies standing on each other's shoulders. A combo problem asks two sub-questions, and each sub-question keeps its own tell — so the trick is not a new pattern but a seam: the sentence inside one skeleton that is itself another chapter's tell. The classics:
Spotting the seam in the room is mechanical: route the outer question through the tree first, start writing the skeleton, and when one line of the skeleton turns out to be a question you can't answer in O(1) — route that line through the tree too. The tree is recursive because problems are.
Sometimes you walk the tree and every leaf feels wrong. Before concluding you've met problem number twenty-one, know the base rates: an unmatched problem is nearly always a graph in a costume or DP that hasn't admitted it yet.
And if neither lens bites, fall back to ch. 2's unstick moves, which are pattern-generators in disguise: work a smaller n (often reveals a recurrence — DP), sort it (often reveals two pointers or greedy), hash something (often reveals the O(1) inner question). Every move produces a sentence to say out loud, which means you are never both stuck and silent.
Recognition has a peculiar property: it's only real at speed. Given thirty seconds, everyone routes correctly; given five, only the trained do — and the interview clock sits in between. So here is the drill this book has been promising since Chapter 1: a 40-problem bank of real titles and constraint lines, a grid of patterns, and a streak counter with no mercy. Play until the per-pattern accuracy stat stops embarrassing you; log misses by pattern, and re-read that pattern's chapter, not the problem's editorial.
A fair warning about the drill: some problems legitimately accept two answers (Path With Minimum Effort is Dijkstra or binary-search-the-answer; Top K Frequent is heap with a hash under it). The bank scores the chapter that owns the canonical solution, and the why-line names the runner-up when there is one — in the room, naming both is worth more than either.
The pattern, as a whiteboard skeleton — the master tells table in 8 lines:
Let's run the whole protocol once, honestly, on Subarray Sum Equals K Medium: given an integer array (negatives allowed) and an integer k, count the subarrays that sum to exactly k. The harvest: input is an array; the ask is a count of contiguous runs; magic word "subarray"; negatives allowed. The tree routes: contiguous → window or prefix; exact sums with negatives kill the window (growing the window can lower the sum, so ch. 6's shrink signal never fires) → prefix sums (ch. 7); and counting all start points fast is a "have I seen this prefix?" question → hash map (ch. 4). A combo, seam and all — the comments below are the walk, verbatim.