#C13923. Find the Single Unique Element
Find the Single Unique Element
Find the Single Unique Element
Given a list of integers in which every element appears twice except for one, your task is to find that single unique element. The problem can be efficiently solved using bitwise XOR operations, which run in O(n) time and use O(1) extra space.
For example, if the input list is [4, 1, 2, 1, 2], then the output should be 4.
inputFormat
The first line contains an integer n denoting the number of elements in the array. The second line contains n space-separated integers representing the elements of the array.
outputFormat
Output a single integer: the element that appears only once in the array.
## sample5
4 1 2 1 2
4
</p>