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
Natanaelel
alexisab
maximec-indy
madeforlosers
Thomasdcrt
Steffan
Shanethegamer
#2
43 c.
Top 56%
Mif712
#3
46 c.
Top 63%
ComputerKWasTaken
#4
47 c.
Top 69%
SephQ
#5
50 c.
Top 75%
emma
#6
54 c.
Top 81%
Seboran
#7
55 c.
Top 88%
KrausRaus
#8
76 c.
Top 94%
thaispalmer
#9
411 c.
Top 100%
Arnaud