GATEverse Practice, past papers & mock tests
GATE 2012
AlgorithmsGreedy MethodhardMCQ2 marks
Consider the directed graph with edge weights: (S, A)=1, (S, B)=2, (S, D)=4, (A, C)=1, (B, D)=3, (C, D)=1, (C, E)=2, (D, T)=2, (E, T)=1. There are multiple shortest paths between vertices S and T. Which one will be reported by Dijkstra’s shortest path algorithm? Assume that, in any iteration, the shortest path to a vertex v is updated only when a strictly shorter path to v is discovered.
Save your progress

Related Algorithms PYQs