-
Notifications
You must be signed in to change notification settings - Fork 2
runlengthencodingrun
bradendubois edited this page Nov 8, 2021
·
7 revisions
ID: runlengthencodingrun
Difficulty: 1.9
CPU Time: 1 second
Memory: 1024 MB
For decoding) check every second character, starting at the first character (the one to output), and loop the amount of times of the number immediately following, outputting this character. For encoding, one can loop through the string and simply count the occurrences of each character, and output the character and tally as one goes.