Graph theory summary-four shortest path algorithms: dijkstra algorithm, Bellman-Ford algorithm, spfa algorithm, floyd algorithm

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,

  1. dijkstra algorithm
  2. Bellman-Ford algorithm
  3. spfa algorithm
  4. Floyd algorithm

Guess you like

Origin blog.csdn.net/HangHug_L/article/details/114017868