7 kyu
Character Counter
419 of 6,654Shivo
Description:
You are going to be given a word. Your job will be to make sure that each character in that word has the exact same number of occurrences. You will return true
if it is valid, or false
if it is not.
For this kata, capitals are considered the same as lowercase letters. Therefore: "A" == "a"
The input is a string (with no spaces) containing [a-z],[A-Z],[0-9]
and common symbols. The length will be 0 < length < 100
.
Examples
"abcabc"
is a valid word because"a"
appears twice,"b"
appears twice, and"c"
appears twice."abcabcd"
is NOT a valid word because"a"
appears twice,"b"
appears twice,"c"
appears twice, but"d"
only appears once!"123abc!"
is a valid word because all of the characters only appear once in the word.
Strings
Algorithms
Similar Kata:
Stats:
Created | Dec 21, 2015 |
Published | Dec 22, 2015 |
Warriors Trained | 11694 |
Total Skips | 439 |
Total Code Submissions | 23307 |
Total Times Completed | 6654 |
C# Completions | 419 |
JavaScript Completions | 2191 |
CoffeeScript Completions | 21 |
Python Completions | 2247 |
Ruby Completions | 549 |
Java Completions | 1189 |
Clojure Completions | 81 |
Haskell Completions | 119 |
C Completions | 88 |
COBOL Completions | 9 |
Total Stars | 155 |
% of votes with a positive feedback rating | 92% of 951 |
Total "Very Satisfied" Votes | 828 |
Total "Somewhat Satisfied" Votes | 99 |
Total "Not Satisfied" Votes | 24 |