Dijkstra, Leetcode Medium, Graph, Cpp.
| 0 1 2 3 <-Nodes bool visited | 0 | 0 | 0 | 0 | //No nodes are visited presently 0 1 2 3 <-Nodes Step-2. Start from node(0). Fill cost of directly connected nodes. cost | 0 | inf | inf | inf | //From node=0, node=0 can be reached in cost=0 visited | 1 | 0 | 0 | 0 | //Mark node=0 as visited Step-3.