For example, [1,2,2,3,3,3,4,3,3,3,2,2,1]
given an array I would like to calculate each element's count:
For 1 => 2, For 2 => 4
You get the idea thanks in advance!
For example, [1,2,2,3,3,3,4,3,3,3,2,2,1]
given an array I would like to calculate each element's count:
For 1 => 2, For 2 => 4
You get the idea thanks in advance!