


If ‘N’ = 6
[1, 3, 6, 5]
Then the output will be 2 4.
The first line of input contains an integer T denoting the number of test cases.
The first line of each test case contains 1 integer N, where ‘N’ - 2 is the number of elements of the array.
The second line of each test case contains ‘N’ - 2 space-separated integers, denoting the array elements.
For each test case, print the two numbers from the range that are missing from this array.
The output of each test case will be printed in a separate line.
Print the result in increasing order.
1 <= T <= 5
1 < N <= 5000
1 <= ARR[i] <= N
Where 'ARR[i]' is the i'th element of the given array.
Time Limit: 1 sec
You do not need to print anything. It has already been taken care of. Just implement the given function.
The idea is to keep track of all the numbers and find which ones are missing from the array, therefore :
The idea is to use the property of XOR that XOR of the same elements cancels each other. Therefore, our approach goes like this :