In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity, by
A. | Dijkstra's algorithm starting from S |
B. | Warshall's algorithm |
C. | Performing a DFS starting from S |
D. | Performing a BFS starting from S |
Answer : D Explanation : Performing a BFS starting from S, runs quicker than Dijkstra's algorithm. However, it is not guaranteed to find the shortest path. |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |