DJ Tarun
Python Code for Prim’s Algorithm # Prim’s Algorithm in Python INF = 9999999 # number of vertices in graph N = 5 #creating graph by adjacency matrix method G = [[0, 19, 5, 0, 0], [19, 0, 5, 9, 2], [5, 5, 0, 1, 6], [0, 9, 1, 0, 1], [0, 2, 6, 1, 0]] …