Ezvor

3662. Filter Characters by Frequency

EasyHash Table Preparing judge… LeetCode
Hash TableStringCounting

Hints

Hint 1
Count the frequency of each character using a 26-entry array or a frequency map, then iterate through the string and append each character whose frequency is less than k to the result.