Problem
You are given a list nums of n integers where **each value is in the range 1 to n. Some values appear twice and others are missing. Return every value from `1` to `n` that does not appear**, in increasing order. As a follow-up, try it with no extra space besides the returned list.
Example 1
- Input
- nums = [4, 3, 2, 7, 8, 2, 3, 1]
- Output
- [5, 6]
Example 2
- Input
- nums = [1, 1]
- Output
- [2]
Example 3
- Input
- nums = [1, 2, 3, 4]
- Output
- []
Constraints
n == nums.length1 <= n <= 10^51 <= nums[i] <= n