publicintgetMinimunToRepair(int numTotalAvailableCities, int numTotalAvailableRoads, List<List<Integer>> roadsAvailable, int numRoadsToBeRepaired, List<List<Integer>> costRoadsToBeRepaired){ int res = 0; UnionFind uf = new UnionFind(numTotalAvailableCities); Collections.sort(costRoadsToBeRepaired, Comparator.comparingInt(c -> c.get(2))); Set<String> set = new HashSet<>();