Problem Description
Given a string A with lowercase english alphabets and you have to return a string in which, with each character its frequency is written in adjacent.
abbhuabcfghh
Input 2:
a
a2b3h3u1c1f1g1
Ouput 2:
a1
‘a’ occurs in the string a total of 2 times so we write a2 then ‘b’ occurs a total of 3 times so next we write b3 and so on
Explanation 2:
‘a’ occurs in the string a total of 1 time only.
NOTE: You only need to implement the given function. Do not read input, instead use the arguments to the function. Do not print the output, instead return values as specified. Still have a question? Checkout Sample Codes for more details.