Dijkstra, Leetcode Medium, Graph, Cpp.
to reach neighbour from me(30)) update neighbour_cost //push (neighbour-cost, neighbour) in minHeap } if (Assumed cost to reach node=2 (inf) > Cost to reach myself from start node + cost to reach 2 from me) update cost cost | 0 | 10 | 10+20 | 50 | 0 1 2 3 if (Assumed cost to reach node=3 (inf) >