M

Mr. Dubey • 52.26K Points
Coach

Q. A greedy algorithm can be used to solve all the dynamic programming problems.

(A) true
(B) false
(C) ---
(D) ---
Correct : Option (B)

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.

Share

Discusssion

Login to discuss.

Be the first to start discuss.