Modify Dijkstra’s algorithm, so that it finds the hop lengths of the shortest paths from a given node s to all other nodes in a given undirected connected graph G. Note that : • find the shortest paths. and need to find the hop lengths of the shortest paths. • The hop length of a path is defined as the total number of hops for the path
2021-10-13 09:34:50 233KB Dijkstra’s algorithm求最短路径
1