Practice
Learn
← Quit
0 / 0 correct
Algorithms
Hard
1 of 40
How does Bellman-Ford detect a negative cycle?
A
It runs Dijkstra twice
B
It counts edges with negative weights
C
It checks if the graph is a DAG
D
After V − 1 rounds of relaxing all edges, if any edge can still be relaxed, a negative cycle is reachable