Loading practice questions
A greedy algorithm can be used to solve all the dynamic programming problems.
Correct Answer: B — False
Explanation:
A greedy algorithm gives optimal solution for all subproblems, but when these locally optimal solutions are combined it may NOT result into a globally optimal solution. Hence, a greedy algorithm CANNOT be used to solve all the dynamic programming problems.