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