```
vector<int> findDuplicates(vector<int>& nums) {
vector<int> res;
for(int i = 0; i < nums.size(); i ++){
nums[abs(nums[i])-1] = -nums[abs(nums[i])-1];
if(nums[abs(nums[i])-1] > 0) res.push_back(abs(nums [i]));
}
return res;
}
```

Same mark by negation as a lot of people use, if you ever come across a value that is positive after negating if you know you've seen it before!