MST Prim algorithm