If we find the (index of the element) + 1 is not equal to the element, just swap the element to the position (element -1). If the swapping enters any loop, just quit.

At last, the element which is not consistent with the index is the answer.

```
class Solution(object):
def findDisappearedNumbers(self, nums):
for i in range(len(nums)):
while nums[i]!= i+1:
nums[nums[i]-1], nums[i] = nums[i], nums[nums[i]-1]
if nums[nums[i]-1] == nums[i]:
break
return [i+1 for i in range(len(nums)) if i+1 != nums[i]]
```