Python, Data Engineering, Algorithms, Computer Science, Data Science.
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, 'E': 5}, 'D': {'A': 1, 'B': 2, 'E': 1}, 'E': {'B': 2, 'C': 5, 'D': 1}, } # Step #1 - Initialize the graph visited = [] unvisited = ['A', 'B',