T
Tom Ha
Hi there,
Assume the following array (contains doubles):
original = [1, 2, 3, 3, 3, 3, 4, 4, 5]
What's the most efficient way to obtain a hash that tells me what
elements of "original" have more than 1 appearance/entry (= doubles)?
The result should look like this:
result = {"3"=>4, "4"=>2}
Thanks for your help!
Tom-n00b
Assume the following array (contains doubles):
original = [1, 2, 3, 3, 3, 3, 4, 4, 5]
What's the most efficient way to obtain a hash that tells me what
elements of "original" have more than 1 appearance/entry (= doubles)?
The result should look like this:
result = {"3"=>4, "4"=>2}
Thanks for your help!
Tom-n00b