public QuickUnionUF(int n) { id = new int[n]; count = n; for (int i = 0; i < n; i++) { id[i] = i; } }