Find Minimum spanning tree , using Prim's algorithm