Array implementation
I have to implement the following logic in java....
suppose there are N elements in an array....
- If elements are repeated more than once then return the element that is repeated the most number of times...
ex: 2,2,1,3,1,2 - this should return 2.
- If elements are repeated equally then return the first element in the array....
ex: 2,2,1,1,3,3 - this should return 2 (first element).
Any help in this implementation is appreciated...thanks...

