Ezvor

3167. Better Compression of String

MediumHash Table Preparing judge… LeetCode
Hash TableStringSortingCounting

Hints

Hint 1
This is an implementation problem.
Hint 2
Try to extract each character with its corresponding frequency.
Hint 3
Sum the frequencies for a single character.
Hint 4
Sort characters and append them to a string in alphabetical order.