Available question text
Given a string composed of character–count pairs (with counts possibly multi-digit and the same character appearing multiple times), parse and sum counts for each character, then return a compressed string listing each character once with its total count, typically sorted lexicographically.
Related questions
Continue with questions that share topics or the same question type.
- Shortest String Compression Using a Doubling Macro Character
Coding
- String Compression
Coding · String · Two Pointers
- String Compression II
Coding
- String Compression III
Coding
Sources · 1 reference
These records explain where the question appears. A company tag or candidate report does not guarantee a future interview question.
Hello Interview · 1 record
No company association
Leetcode 3167. Better Compression of String
Reported date not specified · 0 source reports
Source snapshot: Nov 12, 2026
View source