boolean connect(int i, int j) {
            int ii = find(i);
            int jj = find(j);
            if (ii == jj)
                return false;
            a[ii] = jj;
            return true;
        }
Why Did you create this class? what does it do?
src/problems/hard/SimilarStringGroups.java