Update Shortest Path algorithm (Dijkstra)