Bellman-Ford Algorithm
Bellman-Ford relaxes every edge, once per vertex. A further successful relaxation means a negative cycle is reachable.
Costs
| Category | Algorithm |
| Difficulty | Hard |
| Time | O(V × E) |
| Negative edges | allowed |
| Detects a reachable negative cycle | yes |
Questions
What is Bellman-Ford Algorithm?
Bellman-Ford relaxes every edge, once per vertex. A further successful relaxation means a negative cycle is reachable.
Where do I practice it?
DSA Master keeps challenges and progress on the phone. This page is the idea and the costs.