Added Dijkstra algorithm O(M log N)