Concept Flow - Bellman-Ford algorithm
Initialize distances
Repeat for V-1 times
For each edge (u,v)
Relax edge: if dist[u
Update dist[v
Check for negative cycles
If found: report negative cycle
Else: shortest paths ready
The algorithm initializes distances, relaxes all edges repeatedly, then checks for negative cycles to find shortest paths.