A string s is called good if no two distinct characters have the same frequency.
Given a string s, return the minimum number of character deletions required to make s good.
Note: Characters with a frequency of
are not considered to share a frequency with any remaining character, as they no longer appear in the string.
Constraints:
s.length
s consists only of lowercase English letters.
A string s is called good if no two distinct characters have the same frequency.
Given a string s, return the minimum number of character deletions required to make s good.
Note: Characters with a frequency of
are not considered to share a frequency with any remaining character, as they no longer appear in the string.
Constraints:
s.length
s consists only of lowercase English letters.