Hi all.

I'm trying to find a function to find the number that is repeated over
and the least is repeated within an array. I tried a lot of things but I
can not make it work.

For example:

a = [1 2 2 3 5 4 6 2 6 5 4]

I calculate the number that is repeated over and less repeats and if
possible to calculate something like this for example:

=> With 0 repeats found the number 1.3, etc.
=> With 1 repetition was found the number: 4, etc.
=> With 2 repetitions was found the number 5, etc.

Thanks.

-- 
Posted via http://www.ruby-forum.com/.