in reply to Re^2: find maximum occuring element in a array
in thread find maximum occuring element in a array

Neither Re^2: find maximum occuring element in a array nor Re: find maximum occuring element in a array take into account the "[I]f there is a tie, it should return all the values tied" requirement of the OP. Furthermore, the solution of Re^2: find maximum occuring element in a array leads to a  Use of uninitialized value in numeric lt (<) warning on the first pass through the for-loop.