4 ms·
Dynamic programming is when you break a problem into sub problems and then cache the solutions of the sub problems so the work is only done once. Some common s
by friendlygrammar 10y ago
Dynamic programming is when you break a problem into sub problems and then cache the solutions of the sub problems so the work is only done once.
Some common situations where dynamic programming is useful are when you need to do anything involving finding combinations or permutations of a series of possible actions.
My recommendation for you if you really want to get it is to read and program for yourself the problems on this website
http://www.geeksforgeeks.org/fundamentals-of-algorithms/#DynamicProgramming http://www.geeksforgeeks.org/fundamentals-of-algorithms/#Dyn...
Try solving them both recursively and iteratively and by the time you reach the 5th or 6th problem you should have built something of an intuition for when to use dynamic programming.