Question DSA-GRAPH-0070
HardWhich algorithm detects a negative cycle reachable from the source?
- A.
BFS
- B.
Dijkstra
- C.
Prim
- D.
Bellman–Ford (an extra relaxation still improves a distance)
Sign up free to see the answer and a step-by-step explanation.