String Compression
Lesson 23 of 24 in Coddy's Golang Challenges - Level 1 course.
Challenge
MediumImplement a function that takes a string as input and returns a compressed version of the string. The compressed string should consist of each character followed by the character "#" .
The symbol "#" will repeat depending on the number of times the letter is repeated.
For example:
Original string: "aabccchbbccaaa"
Compressed string: "a##b#c###h#b##c##a###"
Try it yourself
func compressString() {
}
All lessons in Golang Challenges - Level 1
1Introduction
Introduction