filmov
tv
Programming Interview , Count Distinct Characters in a String. Solution in PHP

Показать описание
Given a string, for example : “aaabbcccca” return a string in which the characters appear only once followed by the number of times they appear, in this example the output will be:
a4b2c4
Solution in PHP
a4b2c4
Solution in PHP