Compress a string so each repeating character is followed by its count, omitting the count for a single occurrence.
Unlock detailed company stats for this questionUpgrade
Example: aaaabeee gives a4be3.
Community answers
No answers contributed by the community yet.
Related questions
Compress a string by encoding runs of consecutive identical characters with their counts.Given a list of strings, find the number of occurrences of the second letter of the first word, and return the character and its count.Write an API that takes a string of records, each a two-character length followed by a message of that length, and prints the concatenated messages.Related courses

Course

Course
Course
