cosmos
cosmos copied to clipboard
Bellman Ford Modification
The Bellman Ford's Algorithm finds the single source shortest path without a negative cycle but if there is negative weight cycle how can we detect it?
Bellman Ford algorithm normally does n - 1 iterations. But if there is negative weight cycle, then it should relax even on the nth iteration.
please assign this issue