There is an array of N elements. All but one is repeated thrice. That element has occurred only once. Find the element in O(N) time.