docs: static int[] negate(int[] x, int Max) {
      int[] ans = new int[Max - x.length];
      int i = 0;
      int c = 0;
      for (int j = 0; j < x.length; ++j) {
        int v = x[j];
        for (; i < v; ++i)
          ans[c++] = i;
        ++i;
      }
      while (c < ans.length)
        ans[c++] = i++;
      return ans;
    }