algo4: graph: Dijkstra algorithm to find all shortest distances