


The first line of the input contains a single integer T, representing the number of test cases.
The first line of each test case consists of a single integer N, representing the number of elements in the given array.
The second line of each test case contains N space-separated integers, denoting the elements of the array.
For each test case, print a single integer representing the element that appears only once in the array.
You do not need to print anything. It has already been taken care of. Just implement the given function.
1 <= T <= 100
4 <= N <= 10^4
0 <= arr[i] < 10^9
Time Limit: 1sec
Try to solve this problem in O(N) time and O(1) space complexity.
An easy way to solve this problem is to first store the count of all the elements in a map with keys as elements of the array and value as their frequencies. Then iterate through the map to find out the element whose frequency is 1.