```
def findDisappearedNumbers(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
n = len(nums)
# sort it with O(n)
for i in range(n):
while i != nums[i] - 1 and nums[i] != nums[nums[i]-1]:
next = nums[i]-1
nums[i], nums[next] = nums[next], nums[i]
result = []
for i, x in enumerate(nums):
if i + 1 != x:
result.append(i+1)
return result
```