Find the maximum repeating number (The number that occurs the most) in O(n) time and O(1) extra space .
I think i can use counting sort phase that maintains a count array , then it can be done in O(N) . Am i right ?
But how to handle extra space . Is there any other efficient algorithm ?