Dijkstra, Leetcode Medium, Graph, Cpp.
HashMap of HashMap //node neighbour, cost Adjacency List: unordered_map<int, unordered_map<int,int>> graph; | | | | | |0 |1,10|3,50|1 |0,10|2,20|3,30| 2 |1,20|3,40| 3 |0,50|1,30|2,40| | | | | | Node=0 has 2 neighbours neighbour=1 at distance 10 neighbour=3 at distance 50 Node=1 has 3 neighbours