Algorithm Explained: 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.
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.
Read full article from Algorithm Explained: Strategies Solving DP
No comments:
Post a Comment