algorithms.tutorialhorizon.com

Find the only element in array which appears only once | Algorithms

Given an array of integers, all the elements are appear twice but one element which appears only once. Write an algorithm to find that element. Example: int [] a = { 1,5,6,2,1,6,4,3,2,5,3}; output: 4