Bellman-Ford Algorithm

Shortest paths with negative weights. Detects negative cycles. LC 787.

Unvisited
Relaxing edge
Updated
Shortest path

Controls

Time: O(V·E) | Space: O(V)

Steps