結果 : write prim's algorithm with example