0

How to understand DP?

How to understand dynamic planning quickly and thoroughly?

14th Jul 2018, 10:47 PM
Oscar Jin
Oscar Jin - avatar
2 Antworten
0
Recursive call might be redundant for few different calls during a problem solution... There comes DP into picture.... Just run below code and observe output... I have commented code as much as possible....few lines you will observe in output other than results will help you to understand how redundant calls just avoided getting stored value rather than re computing.... https://code.sololearn.com/cv1cBQf6pfQF/?ref=app
15th Jul 2018, 2:12 PM
Ketan Lalcheta
Ketan Lalcheta - avatar
0
Thanks, Lalcheta. Very nice fib code. But probably you have misunderstood my meaning. c.f. https://en.m.wikipedia.org/wiki/Dynamic_programming
17th Jul 2018, 12:31 AM
Oscar Jin
Oscar Jin - avatar