Given an array find the number which comes with maximum frequency. It must work in O(n) time complexity.
Input Format
Enter the size of the array N and add N more numbers and store in an array
Output Format
Display the number with the maximum frequency.
Sample Input
5
1
2
2
2
3
Sample Output
2
here is my solution, it is failing two test cases?