"Those who cannot remember the past, are condemned to repeat it"
In simple words dp is an optimal form of recursion.
- Optimal substructure
- Ovelapping subrpoblems
First is recursion from where it all begins.Then to optimize this approach dp was introduced we can differentiate dp in two approach
- Top-down approach (Recursion + Memoization)
- Bottom-Up approach (Dynamic Programming)
In this repository you will find both of the approaches.