19 worked problems

Recursion & Backtracking

Explore choices, undo, and try the next. The solution explores a decision tree, decomposes a structure, or must undo a choice before trying another.

Recognition signal

When should you think of Recursion & Backtracking?

The solution explores a decision tree, decomposes a structure, or must undo a choice before trying another.

Core invariant

What must stay true?

The current path represents exactly the choices made from the root to this recursive state.

Practice in a deliberate order

What to learn in this cluster

  1. 01Subsets and combinations
  2. 02Constraint backtracking
  3. 03Partitioning and search with pruning

All Recursion & Backtracking problems

19 of 19 walkthroughs
Continue the cluster

Related patterns and study guides