[spanning trees] adding prim's minimum spanning tree alg