Interview Question2 | Selenium Forum
M
Posted on 23/05/2016
Hi Ashish,

I have got an interview question
Input= AABBBCCCDD
Output =A2B3C3D2

I have tried using hash set and able to get three unique value. But not able to get as output how they are expected.

Could you please help me on this

M
Replied on 24/05/2016

i don't have the working code

but this might help

http://stackoverflow.com/questions/275944/how-do-i-count-the-number-of-occurrences-of-a-char-in-a-string