in Algorithms edited by
854 views
2 votes
2 votes

S1  : We might prefer Floyd-Warshall to Bellman-Ford when we want to find shortest path between all pair of vertices.
S2  : We might prefer Bellman-Ford to Dijkstra’s algorithm when graph have negative edge weights.
S3  : We might prefer BFS to Dijkstra’s algorithm, when we want to find shortest path from specific vertex ‘s’ to any other vertex ‘t’.

in Algorithms edited by
854 views

4 Comments

@srestha bellman ford is used for single source shortest path  i think>>
0
0

  source- wikipedia

The Bellman–Ford algorithm is an algorithm that computes shortest paths from a single source vertex to all of the other vertices in a weighted digraph.[1] It is slower than Dijkstra's algorithm for the same problem, but more versatile, as it is capable of handling graphs in which some of the edge weights are negative numbers.

0
0

in the link you given https://gateoverflow.in/53123/all-pair-shortest-path  they are not talking about bellman ford.

0
0

Please log in or register to answer this question.