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 of the compressed array. You must use only O(1) extra space and handle multi-digit counts as separate characters.
Asked at:
Morgan Stanley
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Early January, 2026
Morgan Stanley
Mid-level
Hello Interview Premium
Your account is free and you can post anonymously if you choose.