Examveda

In which situation is it appropriate to use the Floyd-Warshall algorithm?

A. When the graph is sparse.

B. When you need the shortest path between all pairs of nodes.

C. When the graph is directed only.

D. When the graph is sparse.

Answer: Option B


Join The Discussion

Related Questions on Graph Algorithms (DFS, BFS, Dijkstras, etc)