Search
⌘K
Get Premium
Leetcode 443. String Compression
Compress an array of characters in-place by replacing each run of consecutive identical characters with the character followed by its run length (omit the length when it is 1), returning the new length; you must use only O(1) extra space and handle multi-digit counts as separate characters.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.