Home »
MCQs »
Algorithms MCQs
What type of graph edges does Dijkstra's Algorithm not handle correctly?
6. What type of graph edges does Dijkstra's Algorithm not handle correctly?
- Parallel edges
- Negative weights
- Zero-weight edges
- All of the above
Answer
The correct answer is: C) Zero-weight edges
Explanation
Dijkstra's Algorithm fails with graphs with negative weight edges because it assumes that once a node's shortest path is found, it cannot be improved, which is not true in the presence of negative weights.