Open In App
Related Articles

Algorithms | Dynamic Programming | Question 7

Improve
Improve
Improve
Like Article
Like
Save Article
Save
Report issue
Report

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

Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads