A greedy algorithm can be used to solve all the dynamic programming problems.
A greedy algorithm can be used to solve all the dynamic programming problems. Correct Answer False
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.
মোঃ আরিফুল ইসলাম
Feb 20, 2025