This repository serves as a personal reference and learning resource for mastering DP techniques such as memoization, tabulation, and space optimization.
Dynamic programming is a fundamental concept in algorithm design that is beneficial for solving problems with overlapping subproblems and optimizing substructures. This repository contains:
- Recursive approach
- Top-down (Recursive + Memoization) approach
- Bottom-up (Tabulation) approach
- Optimized versions with reduced space complexity (if possible)
- Clear comments and code organization for better understanding
- Fibonacci series
- Minimum cost of climbing stairs
- Minimum number of coins
- Maximum sum of non-adjacent elements in array or list
- Cut the rod into segment of length x, y, x.
- Count derangements
- Painting fence algorithm
- Knapsack problem
- Combination sum problem
- Perfect square
- minimum cost for tickets