Skip to content

Latest commit

 

History

History
19 lines (16 loc) · 920 Bytes

dp.md

File metadata and controls

19 lines (16 loc) · 920 Bytes

Dynamic Programming

Dynamic Programming (DP) is to plan the best solution dynamically by using the result of solved subproblems. When we are solving DP problems, we need to think about the recurrence relation: how is knowing the results of solved subproblems going to help.

DP problems can be solved recursively or iteratively. The iterative solutions usually have performance advantages, however, the overhead of the recursive approach is often not significant, and code tends to be easier to write.

Medium to Hard