Given a string s and an integer k, construct a new string by keeping only the characters whose total frequency in s is strictly less than k. The relative order of the remaining characters must be preserved.
Return the filtered string.
Constraints:
s.length
s consists of lowercase English letters.
k s.length
Given a string s and an integer k, construct a new string by keeping only the characters whose total frequency in s is strictly less than k. The relative order of the remaining characters must be preserved.
Return the filtered string.
Constraints:
s.length
s consists of lowercase English letters.
k s.length