What is the main difference between Dijkstra's algorithm and the Bellman-Ford algorithm?
-
Dijkstra's algorithm is faster for all graphs
-
Bellman-Ford can handle negative weights, Dijkstra's cannot
-
Dijkstra's algorithm is only for directed graphs
-
Bellman-Ford is more complex to implement