GATE CS 2007 · Graph Traversals (BFS & DFS)

MCQ · 1 mark · Problem PROG-GRPH-0102

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
  1. A
    Dijkstra's algorithm starting from S.
  2. B
    Warshall's algorithm
  3. C
    Performing a DFS starting from S.
  4. D
    Performing a BFS starting from S.

Solve it on GATE DA practice →More Graph Theory & Algorithms problems

Show the worked solutionOfficial GATE Answer Key: Option D.See full step-by-step discussion on GateOverflow: https://gateoverflow.in/1239/gate2007-41

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com