Given an array of integers from 1 to n with some values possibly duplicated, return all numbers in the range that do not appear. Index placement directly reveals which positions are never filled.
nums = array of integers from 1 to n
all missing numbers in ascending order
Example 1:
Input:
nums = [4,3,2,7,8,2,3,1]
Output:
[5,6]
Explanation:
5 and 6 never appear in the array.
Example 2:
Input:
nums = [1,1]
Output:
[2]
Explanation:
Only 1 appears, so 2 is missing.