- Go through the array
- For each val at index i: int val = nums[i]
- Go to the index of val, zero it: nums[val] = 0
- In the end, the index whose value is not 0 is the result

```
public List<Integer> findDisappearedNumbers(int[] nums) {
if (null == nums || nums.length == 0){
return new ArrayList<>();
}
for (int i= 0; i < nums.length; i++){
int val = nums[i];
if (val != 0) {
while (nums[val - 1] != 0) {
int t = nums[val - 1];
nums[val - 1] = 0;
val = t;
}
}
}
List<Integer> r = new ArrayList<>();
for (int k = 0; k < nums.length; k++){
if (nums[k] != 0){
r.add(k+1);
}
}
return r;
}
```