Can you give the hint of this problem

Can you give me hints of this problem .
Problem name is “String Compression” .

hello @aasif2364

u have to compress only consecutive same character.
for example->
aaaabba will be compressed as
a4b2a1

  1. Take the first character of the present string and store it in say ‘ch’. Start iterating over the string and obtain the count of this character occurring consecutively from this point.
  2. Obtain the answer for remaining string recursively.
  3. Return ch+countOfCh+recursiveResult .

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.