Tuesday, September 4, 2018

Strategies Solving DP

Dynamic programming was hard at first, but it became easier if you have right approach to tackle given problem.

First, finding a optimal subproblem is the key, and then finding an way to express the given problem effectively.
Second, find a relationship between between subproblems. Usually, it is from smaller to larger subproblem repetitively.