Question: what is the difference between dynamic programming and greedy method?
Answer: However, the main difference is that greedy algorithms have a local choice of the subproblem that will lead to an optimal answer. On the other hand, dynamic programming would solve all dependent subproblems and then select one that would lead to an optimal solution.