Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

GATE | GATE-CS-2004 | Question 44

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

Suppose we run Dijkstra’s single source shortest-path algorithm on the following edge weighted directed graph with vertex P as the source. In what order do the nodes get included into the set of vertices for which the shortest path distances are finalized?

gate2004
(A) P, Q, R, S, T, U
(B) P, Q, R, U, S, T
(C) P, Q, R, U, T, S
(D) P, Q, T, R, U, S


Answer: (B)

Explanation:  

parul_6

Please refer Dijkstra’s shortest path algorithm
This solution is contributed by Parul Sharma.

Quiz of this Question

My Personal Notes arrow_drop_up
Last Updated : 28 Jun, 2021
Like Article
Save Article
Similar Reads