In which of the following scenarios is the Bellman-Ford algorithm preferred over Dijkstra's algorithm?
A. When all edge weights are positive.
B. When the graph is a complete graph.
C. When the graph is dense.
D. When there are negative weight edges in the graph.
Answer: Option D

Join The Discussion