This repository contains clean and well-organized C++ solutions to classic Dynamic Programming (DP) problems.
Each problem is implemented using the four standard approaches:
- 🧠Recursive
- 🧠Memoized (Top-Down DP)
- 🧮 Tabulation (Bottom-Up DP)
- 🧮 Space Optimized
Each approach builds foundational understanding and is useful in different scenarios:
| Approach | Time Complexity | Space Complexity | Use Case |
|---|---|---|---|
| Recursive | Exponential | O(1) | For brute-force understanding |
| Memoized | O(n × m) | O(n × m) | Efficient for top-down problems |
| Tabulation | O(n × m) | O(n × m) | Good for iterative problems |
| Space Optimized | O(n × m) | O(min(n, m)) | Optimal for large inputs when reconstruction isn’t needed |