Prim's algorithm for minimum spanning tree is added