How do you count duplicates in a ruby array?
For example, if my array had three a\'s, how could I count that
Simple.
arr = [2,3,4,3,2,67,2] repeats = arr.length - arr.uniq.length puts repeats