Given an array with n rational numbers, element in is array called popular if it have appeared at least in 51% of the indices.
I have to design an algorithm that finds such element in O(n) worst case complexity time, that if there is one.
The only ideas I have is to use hash tables but the complexity time is O(n) in average and counting sort but it only works with natural numbers.
Is there anything I am missing or I can use ?