Moving from Dijkstra's algorithm to the Bellman-ford to save cycles