Dynamic Programming Guide
Dynamic Programming is a difficult topic for beginners.
You can find a lot of information on the internet about Dynamic Programming. There are books, YouTube channels and Blogs, but I found it quite hard to find correct solutions to these programs and how to approach them. I thought it would be helpful to create a place where all problems are described one after the other with just explanations where necessary, but also with step-by-step solutions that everyone can follow easily.
After spending a lot of time understanding Dynamic Programming, I wrote the blogpost on Dynamic Programming Patterns, which got viral reaching 6.8k upvotes and 353k views. I have received both positive and negative feedback. There were suggestions that patterns will not help much unless you understand Dynamic Programming basics, which led me to write this guide to explain Dynamic Programming to beginners who just started the journey of learning Dynamic Programming. The source codes for all the sample problems are included.
All code snippets inside the guide are written in C++.
You can access the free sample here (Dynamic Programming Guide Sample).
💡 The guide will answer the following questions:
- What is Dynamic Programming
- How to solve Dynamic Programming Problems
- How to come up with a recursive solution
- How to calculate the time complexity of a recursive solution
- How to come up with an iterative solution
- How to calculate the time complexity of an iterative solution
- How to convert a top-down solution to a bottom-up solution
Contains sample solutions for the following problems:
- Minimum Cost Climbing Stairs
- Minimum Path Sum
- Climbing Stairs
- Burst Balloons
- Best Time to Buy and Sell Stock
- Longest Common Subsequence
- Nim Game
📣Â
I hope this guide will be helpful for you. If you have any feedback please reach me on Twitter. Your feedback will help me to make this guide better.