Week 6 Discussion Forum

Importance of Dynamic Programming

Importance of Dynamic Programming

by MD.Rajib Hossain (192-15-2826) -
Number of replies: 0
Dynamic programming is basically optimization rather than plain repetition. Wherever we see repetitive solutions that call repeatedly for the same inputs, we can optimize it using dynamic programming. The idea is to simply store the results of sub-problems, so that we cannot recalculate them later when needed. This general optimization reduces the complexity of time from frequent to plural.
For example, if we write the simple iteration solution for Fibonacci numbers, we get transient time complexity, and if we save the sub-problem solutions and optimize it, the time complexity becomes linear.

91 words