Solution: String Compression III
C# solution for the String Compression III problem using the Knowing What to Track pattern.
We'll cover the following...
We'll cover the following...
Statement
You are given a string word. Build a new string comp by repeatedly taking a non empty prefix of the remaining word, removing that prefix from word, and appending an encoded form of the prefix to comp.
A prefix can be encoded only if it consists of a single repeated character, and its length is at most k and character c, append the string representation of k followed by c to comp.
Return the final value of comp after the entire word has been processed.
Note: Each encoded group must have length at most
...