Dynamic Programming introduction
Explanation Video
Greedy method and Dynamic Programming both are used to solved optimisation problems. Both are different strategies but the purpose is the same.
Optimisation problems are those that requires minimum or maximum results.
In Greedy method we try to follow predefine procedure to get the optimal result since procedure is known to be optimal.
In Dynamic Programming we try to find out all possible solutions and then pick up the best solution.
Dynamic programming problems are solved using recursive formulas but it's not recursion.
Dynamic programming follow the principle of optimality.
Principle of optimality says that the problem can be solve by taking the sequence of decisions to get the optimal result.
In Greedy method decision is taken one time and in Dynamic programming decision is taken in every stage.
Memoization follow top down approach
Comments
Post a Comment