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

preview_player
Показать описание
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
Рекомендации по теме
join shbcf.ru