Given an array of n integers, where one element appears more than n/2 times. Find element in linear time and constant extra space