CS FundamentalsHardGATE CS (PYQ pattern)

Dijkstra's algorithm runs from A on the undirected graph with link costs A-E 9, A-G 6, B-C 3, B-F 5, B-G 7, C-E 8, C-F 9, C-G 5, D-E 5, D-F 6, E-G 7. In what order are the nodes made permanent (A first), and which node is the 4th to become permanent?

  1. A. E
  2. B. B
  3. C. C
  4. D. D

Correct answer: C. C

Permanent order (node, distance): A 0, G 6, E 9, C 11, B 13, D 14, F 18. The 4th is C.

More Computer Networks questions

Exams that ask this topic