Open In App

Algorithms | Dynamic Programming | Question 7

Which of the following standard algorithms is not Dynamic Programming based?

(A)



Bellman–Ford Algorithm for single source shortest path

(B)



Floyd Warshall Algorithm for all pairs shortest paths

(C)

0-1 Knapsack problem

(D)

Prim\’s Minimum Spanning Tree


Answer: (D)
Explanation:

Prim\’s Minimum Spanning Tree is a Greedy Algorithm. All others are dynamic programming based.

Hence (D) is the correct answer.

Quiz of this Question
Please comment below if you find anything wrong in the above post

Article Tags :