since no one post this, here is the solution. advantage is that it doesn't change the original array

```
class Solution {
public:
vector<int> findDisappearedNumbers(vector<int>& nums) {
int n = nums.size();
vector<int> res(n + 1);
for (int num : nums) {
res[num % (n + 1)] = 1;
}
int i = 0;
for (int j = 1; j < n + 1; ++j) {
if (res[j] == 0) res[i++] = j;
}
res.resize(i);
return res;
}
};
```