6 kyu

Compress/Encode a Message with RLE (Run Length Encoding)

Description:

Run Length Encoding is used to compress data. RLE works like this: characters = "AAAALOTOOOOFTEEEEXXXXXXT" then the encoding will store AAAA = A4 and L1 So all together:

encode("AAAALOTOOOOFTEEEEXXXXXXT") == "A4L1O1T1O4F1T1E4X6T1"
# or
encode("HELLO WORLD") == "H1E1L2O1 1W1O1R1L1D1"
# or
encode("FOO+BAR") == "F1O2+1B1A1R1"

as you can see, its not always as efficient, but with some specific data it works!

Algorithms

Stats:

CreatedSep 12, 2016
PublishedSep 12, 2016
Warriors Trained811
Total Skips20
Total Code Submissions942
Total Times Completed439
Python Completions439
Total Stars14
% of votes with a positive feedback rating92% of 124
Total "Very Satisfied" Votes108
Total "Somewhat Satisfied" Votes13
Total "Not Satisfied" Votes3
Total Rank Assessments12
Average Assessed Rank
6 kyu
Highest Assessed Rank
6 kyu
Lowest Assessed Rank
7 kyu
Ad
Contributors
  • user2619838 Avatar
  • aweleshetu Avatar
  • saudiGuy Avatar
Ad