Added the prim's algorithm for the minimum spanning tree