Skip to content

Recursion problems,
and the tell.

The problem is defined in terms of a smaller version of itself. 34 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 is defined in terms of a smaller version of itself.

The mechanism. Write the base case first, then the step that makes the problem smaller, and trust the call. The call stack does the bookkeeping you would otherwise write by hand.

What goes wrong. A base case the recursion can step over. If the step can skip past it, the stack runs out.

The ones asked most often.

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

  1. Predict the WinnerMediumasked at 3 companies
  2. Special Binary StringHardasked at 4 companies
  3. Split BSTMediumasked at 1 companies
  4. Reorder ListMediumasked at 5 companies
  5. Basic Calculator IVHardasked at 2 companies
  6. Ternary Expression ParserMediumasked at 1 companies
  7. Parse Lisp ExpressionHardasked at 2 companies
  8. Remove Linked List ElementsEasyasked at 1 companies
  9. Minimum Non-Zero Product of the Array ElementsMediumasked at 1 companies
  10. Regular Expression MatchingHardasked at 22 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 recursion problems.

Free to start, no card.

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

The problem is defined in terms of a smaller version of itself.

How many recursion 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 34, split roughly 8 easy, 14 medium and 12 hard in the sample we show, so work up rather than across.

What goes wrong most often in recursion problems?

A base case the recursion can step over. If the step can skip past it, the stack runs out.

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.