Vidyalelo
Data Structure · Q28

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 28

Q28

In which case is the Floyd-Warshall algorithm preferred?

A.
When finding shortest paths between all pairs of nodes.
Answer
B.
When finding the shortest path from a single source.
C.
When the graph is sparse.
D.
When edge weights are all positive.

Answer: Option A

Solution

Answer: Option A
No explanation is given for this question Let's Discuss on Board