1.

Dijkstra’s Algorithm is the prime example for ___________(a) Greedy algorithm(b) Branch and bound(c) Back tracking(d) Dynamic programmingI have been asked this question in an international level competition.My question is from Shortest Path topic in portion Shortest Path of Data Structures & Algorithms II

Answer»

Right answer is (a) Greedy algorithm

Explanation: DIJKSTRA’s Algorithm is the prime EXAMPLE for greedy algorithms because greedy algorithms GENERALLY solve a problem in stages by doing what appears to be the best THING at each STAGE.



Discussion

No Comment Found

Related InterviewSolutions