CJCoding With Joseph

Run-Length Encoding

Compress "aaabbc" using run-length encoding: replace each run of the same character with that character followed by the length of the run. Print:

a3b2c1

Expected Output:

a3b2c1
Topics:
Strings
Code Editor
1
Tab to indent ยท Ctrl+Enter to run ยท Ctrl+Space to expand shortcuts (cw, cr, fori)

Your Output

Run your code to see the output here...

Test Cases

Run your code to see test case results.