Implemented Prim's algorithm to find minimum spanning tree for the given graph