6 kyu
String character frequency
24 of 763KenKamau
Description:
In this Kata, we are going to determine if the count of each of the characters in a string can be equal if we remove a single character from that string.
For example:
solve('abba') = false -- if we remove any character, the count of each character will not be equal.
solve('abbba') = true -- if we remove one b, the count of each character becomes 2.
solve('aaaa') = true -- if we remove one character, the remaining characters have same count.
solve('wwwf') = true -- if we remove f, the remaining letters have same count.
More examples in the test cases. Empty string is not tested.
Good luck!
Strings
Algorithms
Similar Kata:
Stats:
Created | Nov 26, 2017 |
Published | Dec 2, 2017 |
Warriors Trained | 2302 |
Total Skips | 60 |
Total Code Submissions | 9515 |
Total Times Completed | 763 |
JavaScript Completions | 287 |
Python Completions | 423 |
Ruby Completions | 58 |
Haskell Completions | 24 |
Total Stars | 84 |
% of votes with a positive feedback rating | 92% of 229 |
Total "Very Satisfied" Votes | 195 |
Total "Somewhat Satisfied" Votes | 30 |
Total "Not Satisfied" Votes | 4 |
Total Rank Assessments | 3 |
Average Assessed Rank | 6 kyu |
Highest Assessed Rank | 6 kyu |
Lowest Assessed Rank | 7 kyu |