Daily challenge for 2025-12-16
350. String Compression Count
Given an array of characters chars, compress it by replacing consecutive repeating characters with the character followed by the count. Return the new length of the array.
If a character appears only once, just keep the character (no count).
Example:Input: chars = ["a","a","b","b","c","c","c"]Output: 6
Explanation: The compressed form is ["a","2","b","2","c","3"], length 6.
Run this challenge interactively in Python or JavaScript when the app loads.