Problem 3163 · Medium

String Compression III

Write each run of equal letters as a count of at most nine followed by the letter, scanning left to right.

Open the interactive visualisation