You are given an integer array nums of length n, where each element nums[i] lies in the range [1, n].
Your task is to find all numbers between 1 and n (inclusive) that do not appear in the array.
The output should be returned as a list of missing numbers in ascending order.
Input: nums = [5, 4, 6, 7, 9, 3, 2, 1, 3, 7]
Output: [8, 10]
Explanation:
The numbers from 1 to 10 are expected, but 8 and 10 are missing from the array.
Input: nums = [2, 2, 3, 1, 5, 5]
Output: [4, 6]
Explanation:
Numbers 4 and 6 are not present in the range [1, 6].
Accepted:
Submission: