Question
Equal Frequency by One Removal
In a village of letters, you are given a magical string called "term" that contains only lowercase English letters. Your task is to carefully remove exactly one letter from this string, in such a way that the remaining letters all appear with the same frequency. The challenge is to determine whether this magical transformation is possible. You must remove one letter - doing nothing is not an option - and ensure that the remaining letters are balanced, each with equal frequency. Your goal is to decide if this delicate balance can be achieved by removing just one letter. If it can, return true; if not, return false.
Input
The first and only line of the input contains the string "term".

Constraints
2 ≤ term.length ≤ 100
"term" consists of lowercase English letters only.
Output
Return true if it is possible to remove one letter so that the frequency of all letters in word are equal, and false otherwise.
Example
Sample Input
abcc
Sample output
true
Explanation
Select index 3 and delete it: word becomes "abc" and each character has a frequency of 1.

Online