Skip to content
Related Articles

Related Articles

Improve Article
Save Article
Like Article

ISRO | ISRO CS 2017 – May | Question 74

  • Last Updated : 22 Sep, 2021

Which of the following algorithm solves the all-pair shortest path problem?
(A) Prim’s algorithm
(B) Dijikstra’s algorithm
(C) Bellman-Ford’s algorithm
(D) Floyd-Warshall’s algorithm


Answer: (D)

Explanation: Prim’s Algorithm is used to find MST of a given graph. Refer: Prim’s Minimum Spanning Tree (MST)
Dijikstra’s Algorithm is used to find the shortest path from source to all the other nodes in a weighted graph. Refer: Dijkstra’s Algorithm
BellmanFord’s Algorithm is used to find the shortest distance from source to all other nodes in a graph that can contain negative weight edges. Refer:Bellman–Ford Algorithm
Floyd-Warshall’s Algorithm: It is an All-pair-shortest path algorithm, used to find shortest distance between every pair of vertices. Refer: Floyd Warshall Algorithm
So, option (D) is correct.

Quiz of this Question

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!