Python, Data Engineering, Algorithms, Computer Science, Data Science.
shortest_distance dictionary. If the distance from the starting node to the neighbor is smaller than the current distance, update the distance. import numpy as np # Step #0 - Set Problem - Start at A, Finish at C graph = { 'A': {'B': 6, 'D': 1}, 'B': {'A': 6, 'D': 2, 'C': 5, 'E': 2}, 'C': {'B': 5,