Update Bellman-Ford Shortest Path algorithm