Dynamic Programming – From Novice to Advanced
Recursion is widely used in solving problems during your first approach because they’re easy to implement. However, some computation may occur multiple times, this leads to inefficient and stack overflow. Dynamic programming is a technique that attempts to solve a subset of problems then using that knowledge to develop results for larger problems until you’ve reached the final result. When we are using recursion to solve a problem, we can apply dynamic programming to solve that problem in a more efficient way.