But if m = O(n2) it's better to use the first implementation of Dijkstra. The origin of this algorithm is unknown. It's said that at first Chinese coders used it in programming contests. Its code looks lik
How to implement weighted Graph in c++ for higher values of n = 10^5 (n vertices graph)?? If n = 10^3 i generally implement using adjacency matrix or by using vector stl.