GATE CS 2005 · Graph Traversals (BFS & DFS)

MCQ · 1 mark · Problem PROG-GRPH-0114

Let G(V,E) be an undirected graph with positive edge weights. Dijkstra's single source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
  1. A
    O(\(|V|^{2}\))
  2. B
    O(|E| + |V|log|V|)
  3. C
    O(|V|log|V|)
  4. D
    O((|E| + |V|) log |V|)

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/1374/gate2005-38

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