|
|
|
|
|
by alangpierce
2656 days ago
|
|
> So "DP" is just recursion with memoization? Sort of. "I know DP" doesn't just mean "I know what memoized recursion is". It means "I know how to take a problem, recognize that DP might help, frame it recursively with highly-overlapping subproblems, and use memoized recursion to implement an efficient algorithm for it". Especially in advanced cases, it take a lot of skill to look at a problem in just the right way that memoized recursion makes it computationally easy. For example, sometimes you might have a problem where the simple DP approach takes n^3 space, but with some trickery you can get it down to n^2. |
|