Prim's MST algorithms was implemented