Coding
Implement String Compression
Implement string compression.
Input: chars = ["a","b","b","b","b","b","b","b","b","b","b","b","b"]
Output: ["a","b","1","2"]
Explanation: The letter 'a' appears once (so no number is appended), and 'b' appears 12 times, modifying the array in place to length 4.
Was asked at