Dynamic Programming is nothing but optimized version of recursion. Dynamic programming reduce the time complexity of simple recursion from exponential to polynomial.
The basic idea behind dynamic programming to store the results of subproblems so that, we don't have to re-calculate them again and again.
There are two approaches for solving dynamic programming questions :
- Tabulation Method or Bottom Up Approach.
- Memoization Method or Top Down Approach.
I am going to cover these two approaches in detail in my post. So, don't forget to check my next post.
💖💖 Keep reading and keep supporting.💖💖
Top comments (0)