L3VLUP
Atlas

TechniqueLessonSoftware engineeringDecision-making

In dynamic programming the hard part is finding the subproblem, not the memoisation

Reducible · 5 Simple Steps for Solving Dynamic Programming Problems

The idea

Candidates learn dynamic programming as a technique for caching results, and then fail the problems because caching was never the difficulty. Reducible's approach starts earlier: find the subproblem, the smaller version of the question whose answer the larger one is built from, and the relationship between subproblems, before touching an implementation. Once the recurrence is written down, memoisation is mechanical. The lesson transfers beyond coding interviews. Most hard problems are hard because the decomposition is not obvious, and the work is in finding the structure rather than in executing on it.

Find the subproblem and the recurrence first; the implementation is mechanical once the structure is clear.

When it works

Coding interviews, and any problem whose difficulty is in the decomposition.

When it may fail

Not every problem has a clean recurrence, and recognising which pattern applies is itself a skill that needs practice across many problems. The method helps once you have guessed the pattern.

How to use it

On a dynamic programming question, spend the first minutes saying out loud what a smaller version of the problem looks like and how the answer to it feeds the full one. Write the recurrence on the whiteboard before any code.

Where it came from

Video 5 Simple Steps for Solving Dynamic Programming Problems · Reducible

What the source says. Reducible finds the subproblem and the relationship between subproblems before touching an implementation.

Open the source at 0:00 to 6:51 (opens in a new tab)Checked against the clip · reviewed 2026-10-16

Connected ideas

Concepts

Put it to work on L3VLUP

More like this