Skip to content

Backtracking problems,
and the tell.

The problem asks for all the arrangements, combinations or placements that work. 63 problems in the catalogue carry this tag, from first-week easy to interview hard.

Free to start. Running and submitting a solution never costs credits.

How the pattern actually works.

One mechanism, and the mistake that costs people the problem.

The tell. The problem asks for all the arrangements, combinations or placements that work.

The mechanism. Choose, recurse, then undo the choice. Prune the moment a partial answer cannot possibly finish, which is what separates a few thousand calls from a few billion.

What goes wrong. Forgetting to undo. State left behind after a branch returns silently corrupts every branch after it.

The ones asked most often.

By how often the catalogue records them being set, not by our opinion.

  1. Synonymous SentencesMediumasked at 3 companies
  2. Additive NumberMediumasked at 1 companies
  3. Minimum Time to Break Locks IMediumasked at 1 companies
  4. Maximum Points in an Archery CompetitionMediumasked at 1 companies
  5. Largest Time for Given DigitsMediumasked at 1 companies
  6. Maximum Good People Based on StatementsHardasked at 1 companies
  7. Letter Case PermutationMediumasked at 1 companies
  8. Optimal Account BalancingHardasked at 5 companies
  9. Maximize Score After N OperationsHardasked at 1 companies
  10. Next Greater Numerically Balanced NumberMediumasked at 1 companies

Read it, watch it, then solve it.

The order that makes a pattern stick.

Everything in the app, in one place.

Practice, interviews and the tools, all free to start. Swipe to see the rest.

Free to start: 100 AI credits when you sign up and 100 every month. Start free in the app

About backtracking problems.

Free to start, no card.

Start practising
How do I know a problem is a backtracking problem?

The problem asks for all the arrangements, combinations or placements that work.

How many backtracking problems should I solve?

Enough to stop needing the hint, which is usually ten to fifteen across the levels, not the whole list. The catalogue tags 63, split roughly 1 easy, 41 medium and 21 hard in the sample we show, so work up rather than across.

What goes wrong most often in backtracking problems?

Forgetting to undo. State left behind after a branch returns silently corrupts every branch after it.

Is practising by pattern better than a problem sheet?

A sheet tells you what to solve. A pattern tells you why those problems sit together, which is the part that carries over to the problem you have not seen. That is why the app files every problem under its pattern.