O(n) algorithm to find out the element appearing more than n/2 times
<p>I was asked in an interview to give an O(n) algorithm to print an element that appears more than n/2 times in an array, if there is such an element. n is the size of the array.
I don't have any clue on how to do this. Can anyone help?</p>
