Vidyalelo
Data Structure · Q9

Graph Algorithms (DFS, BFS, Dijkstras, etc)

Programming · Data Structure · question 9

Q9

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

Answer: Option D

Solution

Answer: Option D
No explanation is given for this question Let's Discuss on Board