結果 : prim's algorithm using greedy method