Mixed recall introduction

Mixed recall

You've reached the end. This final section has no new theory — it's a review. The problems here are deliberately unlabelled: nothing tells you "this is a sliding window" or "this is dynamic programming." Figuring out which tool a problem calls for is the single most valuable skill this course set out to build, and that's exactly what these exercises drill.

How to use this section

For each problem, before you write any code, ask:

  • What's the shape of the input? Array, string, tree, graph, grid?
  • What's being asked? A count, a max/min, a boolean, an arrangement, a path?
  • Which pattern fits?
  • "Subarray / substring of…" → sliding window or prefix sums.
  • "Shortest / fewest steps" → BFS. "Cheapest with weights" → Dijkstra.
  • "All / every / arrangements" → backtracking.
  • "Max/min over choices with overlap" → dynamic programming.
  • "Connected / groups" → DFS/BFS or union-find.
  • "Sorted input" → binary search or two pointers.

Spaced repetition

These problems revisit patterns you met chapters ago, on purpose. Re-deriving a solution after some time away is far more durable than re-reading one — that gap is where real retention happens. If a problem stumps you, name the pattern first, then recall the template, then code.

Take your time, draw pictures, and enjoy the feeling of reaching for the right tool without being told which drawer it's in. That's what it means to have learned this material. Good luck.