School project to get minimum spanning tree in graph of nodes and edges