#K49792. Find Two Unique Numbers
Find Two Unique Numbers
Find Two Unique Numbers
You are given an array of integers where every element appears exactly twice except for two elements which appear only once. Your task is to find these two non-repeating numbers and print them in ascending order.
It is guaranteed that exactly two numbers appear only once and all other numbers appear twice.
Hint: You may use bitwise operations to achieve an optimal solution.
inputFormat
The first line of input contains a single integer N
representing the number of elements in the array. The second line contains N
space-separated integers.
outputFormat
Output the two non-repeating numbers in ascending order separated by a space.
## sample8
1 2 1 3 2 5 4 4
3 5