The 2nd Codility lesson is to search for the odd number of elements in an array that cannot be paired with any other element. Codility provided this example.
A = 9, A = 3, A = 9
A = 3, A = 9, A = 7
A = 9
Apart from A, every other element has a match. The first thought is to iterate through the array and look for the pair and remove both elements once it is found. When an element cannot find its pair, break from the loop and return the element. Simple enough, so I coded.
It works for a small number of elements but Codility needs this to run in less than 1 second when tested in big random sets with 999,999 elements. My solution runs in time for only tests with 2,001 elements or less.
And this become a revision for bitwise operators after reading the comments in Codility. This was the final answer, adapted from what another programmer shared.