Minimum Spanning Tree (Prim Algorithm)