Introduction - If you have any usage issues, please Google them yourself
In practical problems, the edge weight is generally in the form of being the right, but many cases the negative right to exist. This time, the shortest path may not exist. We can not get the algorithm dijkstra algorithm time complexity is low, but you can still use the bellman-ford iterative algorithm to solve the problem.
The bellman-ford algorithm is an iterative algorithm, it is not the dijkstra algorithm to directly calculate the distance value of each point in a certain order, but modify each point of the current minimum distance value, until you find the real shortest distance so far .