โ Back to Strings
Question 424
Run-Length Encoding
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:
a3b2c1Expected 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.