0
Suppose I have a sorted array, and each element may appear multiple time.
To make it simple, here is an example,
[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3]
The expected output is the number of each elements, in this example, results are,
...