DIY: String Compression

Solve the interview question "String Compression" in this lesson.

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: ...

Access this course and 1400+ top-rated courses and projects.