My Path to Algorithms & Data Structures: Part 4 Dynamic Programming Intro
First Dynamic Programming Problem From LeetCode
When I first encountered this problem I was not familiar with dynamic programming. What I learned was that dynamic programming is a powerful technique that reduces the redundancies of recursive strategies.
What is Dynamic Programming?
Dynamic programming breaks down the problem into smaller and yet smaller possible sub-problems. These sub-problems are not solved independently. Instead, results of these smaller sub-problems are remembered and used for similar or overlapping sub-problems.
We use dynamic programming when we have problems that can be divided in smaller sub problems so that those results can be reused.