DIY: String Compression
Solve the interview question "String Compression" in this lesson.
We'll cover the following...
Problem statement
You are given a list of characters. Your task will be to compress this list, using the following algorithm:
For each group of consecutive repeating characters in the string:
- If the group’s length is
Access this course and 1400+ top-rated courses and projects.