Concept Flow - Bellman Ford Algorithm Negative Weights
Initialize distances with infinity
Set source distance to 0
Repeat V-1 times:
For each edge:
Check if distance can be improved
If yes, update distance
Check for negative weight cycles
If found: report cycle
Return shortest distances
The algorithm initializes distances, relaxes edges repeatedly, then checks for negative cycles.
