Dijkstra, Leetcode Medium, Graph, Cpp.
Cost to reach myself from start node + cost to reach 3 from me) update cost cost | 0 | 10 | 10+20 | 10+30 | 0 1 2 3 Complexity Time: O(VE) Traverse through all node, ie Vertices=V. O(V) Reach every edge from every Node. Edges=E. O(E) Space: O(1). if stored graph is provided 787. Cheapest Flights