Using Prim`s Algorithm