Dynamic Programming

Please tell me the Best way to learn Dynamic programming.

There are different tutorials available for DP to start from scratch… I found some on different platforms which may help…

CodeChef, HackerEarth, TopCoder, Some link Found through CodeForces. There are plenty of articles and suggestions like this on net, on Quora and on different coding platforms.

You should try to think, how can you solve smaller problem if given and from that how can you solve problem just bigger than this. Try to think in different dimensions, like the problem from this August challenge CHEFFA. By practicing in proper order you will learn how can you choose different dimensions of problem to break it into simpler problem which will help to solve bigger problem using iteration or recursion. It can be combined with other concepts too but that would be later part.

For Practicing in proper order I will suggest to try codeforces problem in order of solved by most people here. This was point from where I started and learnt many things after that.

Hope this will help.

2 Likes

@kauts_kanu

How much should we solve from codeforces, there are lot of.

@arpit728 Actually I solved it in kind of fibonacci order… I mean… When I felt that problems are easy at initial and I got confidence that I could solve them, I started skipping problems in increasing order… That’s what I also did while practicing on codeChef from beginner level to medium level… On codeforces they also give tags, I will suggest to start from beginning and use fibonacci thing that I mentioned If you like, and try to solve problems which involve more concepts along with dp… like dp and tree, dp and graph, dp and segment tree etc… That should help…