private static int increment(int[] indexes, int i, BitSet set, int length) {
    if (i + 1 < indexes.length) {
      set.set(indexes[i] + 1, indexes[i + 1]);
    }
    else {
      set.set(indexes[i] + 1, length);
    }
    return i + 1;
  }
private static int increment(int[] indexes, int i, BitSet set, int length)