0
40kviews
Compare Greedy and dynamic programming approach for algorithm design. Example how both can be used to solve Knapsack problem
1 Answer
| written 8.8 years ago by |
| Greedy | Dynamic Programming |
|---|---|
| A greedy algorithm is one that at a given point in time, makes a local optimization. | Dynamic programming can be thought of as 'smart' recursion.,It often requires one to break down a problem into smaller components that can be cached. |
| Greedy algorithms have a local choice of … |