Skip to content
Related Articles
Open in App
Not now

Related Articles

Algorithms | Graph Shortest Paths | Question 14

Improve Article
Save Article
  • Difficulty Level : Hard
  • Last Updated : 09 Jul, 2021
Improve Article
Save Article

Consider the directed graph shown in the figure below. 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.


Answer: (D)

Explanation: See Dijkstra’s shortest path algorithm

When the algorithm reaches vertex ‘C’, the distance values of ‘D’ and ‘E’ would be 7 and 6 respectively. So the next picked vertex would be ‘E’

Quiz of this Question

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!