Just use the numbers to mark the array by adding it's length. If an index is not marked, then that was a missing number. If it's marked twice, then that was the duplicated number.

```
def findErrorNums(self, nums):
"""
:type nums: List[int]
:rtype: List[int]
"""
n = len(nums)
for num in nums :
nums[(num - 1) % n] += n
result = [""] * 2
for i, num in enumerate(nums) :
if nums[i] > 2*n : result[0] = i + 1
elif nums[i] <= n : result[1] = i + 1
return result
```