Algo2 first week assignment A3 - Prim's algorithm