Skip to content

stringseasy

Run-Length Encoding

75 points · 0 solved

Read one line of lowercase letters (1–1000 characters). Print its run-length encoding: for each run of identical letters, the run length followed by the letter. Example: aaabcc → 3a1b2c.

aaabcc
3a1b2c
Learn the technique/learn/algorithms-data-structures

main.py