How does the Bellman-Ford algorithm work?
(V is the number of vertices in the graph.)
The Bellman-Ford algorithm
finds the shortest paths
by basically just checking
(relaxing) all @(5) V-1 times.
The Bellman-Ford algorithm
finds the shortest paths
by basically just checking
(relaxing) all edges V-1 times.