Tap here to switch tabs
Problem
Submissions

Problem: Minimum Deletions to Make Character Frequencies Unique

Try to solve the Minimum Deletions to Make Character Frequencies Unique problem.

Statement

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 00 are not considered to share a frequency with any remaining character, as they no longer appear in the string.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists only of lowercase English letters.

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Minimum Deletions to Make Character Frequencies Unique

Try to solve the Minimum Deletions to Make Character Frequencies Unique problem.

Statement

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 00 are not considered to share a frequency with any remaining character, as they no longer appear in the string.

Constraints:

  • 1≤1 \leq s.length ≤105\leq 10^5

  • s consists only of lowercase English letters.