結果 : cheapest edge algorithm