The premise of finding the shortest path is that there is no negative weight loop in the graph.
For unweighted graphs, the BFS algorithm can be used to find the shortest path.
For the right graph,
Graph theory summary-four shortest path algorithms: dijkstra algorithm, Bellman-Ford algorithm, spfa algorithm, floyd algorithm
Guess you like
Origin blog.csdn.net/HangHug_L/article/details/114017868
Ranking