Back to stories
<Engineering/>
Premium

Dynamic Programming: An Introduction with Examples

Share by

Dynamic Programming: An Introduction with Examples

Dynamic programming (DP) is a technique for solving problems by breaking them into overlapping subproblems and storing results so each subproblem is solved once. This post introduces the idea and two main implementation styles: memoization and tabulation.


When DP applies

DP is useful when: