Add Bellman-Ford algorithm implementation.