Dynamic programming definition
A technique to solve a hard problem by breaking it into sub problems and solving those first
Dynamic programming and dependencies
It does not work when sub problems depend on each other. It only handles discrete sub problems
Knapsack problem
Dynamic programming is good when you are trying to optimize something given a restraint.
When can you use dynamic programming
When the problem can be broken into discrete sub problems that don’t depend on each other.
Characteristics of dynamic programming
The solution always has a grid
The values are usually what you are trying to optimize
Each cell is a sub problem
There is a constraint ie time weight