Bellman-Ford
RU: Bellman-Ford
A shortest-path algorithm that relaxes all edges V-1 times, running in O(V*E). It handles negative edge weights, which Dijkstra's algorithm cannot, and can detect negative cycles.
RU: Bellman-Ford
A shortest-path algorithm that relaxes all edges V-1 times, running in O(V*E). It handles negative edge weights, which Dijkstra's algorithm cannot, and can detect negative cycles.