Dijkstra, Weighted Graph, Data Structure Algorithm, Algorithms, Graph Data Structure.
doesn’t guarantee optimal solution though it gives an approximate solution in reasonable time. As the result of that once the edge is relaxed Dijkstra’s algo doesn’t look for that vertex once more. As you can see if you break down an optimal solution: the vertex 2 must have -3 when you traverse