3662. Filter Characters by Frequency
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.Preparing judge…