Run-Length Encoding

Compress strings by replacing sequences of identical characters with that character followed by a count.

Easy5/15/2024

Problem statement

Run-length encoding (RLE) compresses strings by replacing sequences of identical characters with that character prefixed by a count. For instance, aaaabcccaa should be compressed to 4a1b3c2a.

Problem leaderboard

#
Size
%
Users
#1
42 c.
Top 50%
voytxt
maximec-indy
alexisab
Thomasdcrt
Natanaelel
Steffan
Shanethegamer
#2
46 c.
Top 57%
ComputerKWasTaken
#3
47 c.
Top 64%
SephQ
#4
50 c.
Top 71%
emma
#5
52 c.
Top 79%
madeforlosers
#6
54 c.
Top 86%
Seboran
#7
55 c.
Top 93%
KrausRaus
#8
411 c.
Top 100%
Arnaud