#K46187. Find Disappeared Numbers
Find Disappeared Numbers
Find Disappeared Numbers
You are given an array of n integers where each integer is in the range [1, n]. Some elements may appear twice while others appear once. Your task is to find all the integers in the range \(1 \leq i \leq n\) that do not appear in the array.
Example:
Input: 8 4 3 2 7 8 2 3 1</p>Output: 5 6
If the array contains all numbers in the range, output an empty line.
inputFormat
The input is given via standard input (stdin). The first line contains an integer (n) representing the number of elements. The second line contains (n) space-separated integers representing the array.
outputFormat
Output the missing numbers in increasing order separated by a space. If no numbers are missing, output an empty line.## sample
8
4 3 2 7 8 2 3 1
5 6