then. Finally, through the test and comparison of these three algorithms, the following conclusions are drawn:<br>( One ) Dijkstra : single source shortest path for graphs with nonnegative weight values.<br>( Two ) Bellman-Ford : it is applicable to the single source shortest path of graphs with negative weight values, and can detect negative cycles.<br>( Three ) SPFA : it is applicable to the single source shortest path of graphs with negative weights and no negative cycles.<br>
正在翻译中..