Update MinimumCostSpanningTree.java