In an array you have all the numbers from 1 through n (not in order) with one number missing. Find that number. Now, you have two numbers missing. Find both the numbers.
Implement find_missing_numbers(nums, n). The input contains every distinct value from 1 through n except exactly one or two values, and the function must return the missing values in ascending order. Use no sorting and O(1) auxiliary space.
def find_missing_numbers(nums, n):