Available question text
Compress a lowercase string using run-length encoding by repeatedly removing the longest prefix of a single repeated character of length at most 9 and appending "<count><char>" (splitting any run >9 into multiple entries). Return the concatenated result (n up to 2·10^5).
Related questions
Continue with questions that share topics or the same question type.
- Better Compression of String
Coding
- Reverse Words in a String III
Coding
- Shortest String Compression Using a Doubling Macro Character
Coding
- String Compression
Coding · String · Two Pointers
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3163. String Compression III
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source