Which of the following shortest-path algorithms can handle graphs that contain negative edge weights (but no negative cycles)?
- ABellman–Ford algorithm
- BDijkstra's algorithm
- CPrim's algorithm
- DKruskal's algorithm
Correct answer: A
Which of the following shortest-path algorithms can handle graphs that contain negative edge weights (but no negative cycles)?