For example if I have a list as follows:
[3, 3, 3, 3, 3, 3, 100, 1, 1, 1, 1, 1, 1, 200, 3, 3, 3, 100, 1, 1, 1]
How can I remove the duplicate elements and represent the same element followed by the number of times it's repeating? Example Output:
[3, 6, 100, 1, 6, 200, 3, 3, 100, 1, 3]
Where 3 is repeating 6 times... 1 repeating 6 times... and so on
[3,2]and[3,3,3]map to same thing, does that raise a potential issue?