Dijkstra's shortest-path algorithm does NOT work correctly when the graph has what?
- A Cycles
- B Negative-weight edges
- C Disconnected vertices
- D More than 100 vertices
Explanation
Dijkstra's algorithm assumes non-negative edge weights; with negative weights a vertex marked as final may later be reached by a shorter path.