Question
Balanced Letter Removal
In a kingdom of enchanted letters, a young scribe named Arin was tasked with a peculiar challenge by the royal librarian. He was handed a magical scroll that contained a sequence of letters, and his task was to remove exactly one letter in such a way that all the remaining letters would appear the same number of times. The condition was clear: no skipping the task - one letter must be removed. Arin pondered the scroll carefully. Would it be possible to achieve such perfect balance by removing just one letter? Could he ensure that all remaining letters had equal frequency? His decision would determine whether the task could be done - true or false.
Input
The first and only line of the input contains a single string "scroll".
Constraints
2 ≤ scroll.length ≤ 100
"scroll" consists of lowercase English letters only.
Constraints
2 ≤ scroll.length ≤ 100
"scroll" 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.
abcc
Sample Output
true
Explanation
Select index 3 and delete it: word becomes "abc" and each character has a frequency of 1.