Problem 107
-prim's algorithm