Search
⌘K

Leetcode 3163. String Compression III

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


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Your account is free and you can post anonymously if you choose.