Should the input contain only same values in consecutive places or are they can be randomly placed.
CPP : String Compression
@Riankk Same values in the input can be at consecutive as well as random places.
For example, aaabbbccd and aabbccaadbb are both valid inputs.
But the output of aaabbbccd should be a3b3c2d1 and output of aabbccaadbb should be a2b2c2a2d1b2.
Hope this helps.