Memoization and introductory dynamic programming
- Stage
- 4
- Module
- M4.11
- Lessons
- 1
In this module
- Recognize when a recursive function recomputes the same subproblems.
- Use memoization to cache results and avoid redundant work.
- Reframe a memoized recursion as dynamic programming building up from smaller subproblems.
- Understand why this transforms exponential time into polynomial time.
Before this module
Lessons
Practice
Try this on the judge. The link opens the problem on DMOJ.
- 2015 J5π-day (opens on DMOJ in a new tab) DMOJ
Count the ways to reach a target using memoized recursion over smaller subproblems.