3 ms·
I'd actually go the other way round: figuring out a suitable recurrence relation is usually the first step in any dynamic programming solution. As a next step,
by eru 1y ago
I'd actually go the other way round: figuring out a suitable recurrence relation is usually the first step in any dynamic programming solution. As a next step, sure, you can explicit construct a table to fill in, but that's not actually a requirement: dynamic programming also works when your parameters aren't things like numbers that you can easily use to enumerate rows in a table.
Memoisation is a more general tactic that hands more of the busy work over to the computer.