Tap here to switch tabs
Problem
Submissions

Problem: Minimum Deletions to Make Character Frequencies Unique

Minimum Deletions to Make Character Frequencies Unique asks you to delete as few characters as possible so every character still present in the string has a different frequency.

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

Minimum Deletions to Make Character Frequencies Unique asks you to delete as few characters as possible so every character still present in the string has a different frequency.

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.