```
class Solution {
public:
vector<int> findDisappearedNumbers(vector<int>& nums) {
std::vector<int> result;
for (int i=0; i<nums.size(); ++i) {
if(nums[abs(nums[i])-1] > 0) { // if location is positive, make it negative
nums[abs(nums[i])-1] = 0-nums[abs(nums[i])-1];
}
}
for (int i=0; i<nums.size(); ++i) {
if (nums[i]>0) { // never found if positive
result.push_back(i+1);
}
}
return result;
}
};
```