engineering recuitment NIC NIELIT Scientist B 2023 Mock Test Algorithms Graphs/Spanning Tree and Shortest Paths Shortest Paths
Consider the following graph:
Find the shortest path from vertex 1 to vertex 9 if Dijkstra’s shortest path algorithm is applied.
1
1 – 2, 2 – 3, 3 – 5, 5 – 7, 7 – 8, 8 – 9
2
1 – 2, 2 – 3, 3 – 6, 6 – 8, 8 – 9
3
1 – 2, 2 – 3, 3 – 5, 5 – 6, 6 – 8, 8 – 9
4
1 – 2, 2 – 3, 3 – 6, 6 – 5, 5 – 7, 7 – 8, 8 – 9