Data Structures

1: Which of the following algorithms solves the all-pair shortest path problem?  
A.

 Dijkstra's algorithm

B.

Floyd's algorithm

C.

Prim's algorithm

D.

 Warshall's algorithm

 

Answer : B

Explanation :

Dijkstra's algorithm solves single source shortest path problem. Warshall's algorithm finds transitive closure of a given graph. Prim's algorithm constructs a minimum cost spanning tree for a given weighted graph.

Write your comments here:


Report Error
 

Option: A

Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here.