This is just one of the cool things that you can do with XOR. Problem Statement Given an array, find number that occurs odd number of times. Input: [1,2,2,3,3,1,5,1,5,5,5]
Output: 1 Understanding XOR (eXclusive OR) The logic is simple. If the bits are the same, the result is 0. If the bits are different, the result…