6 kyu
Counting Duplicates
76,291 of 243,492kgashok
Description:
Count the number of Duplicates
Write a function that will return the count of distinct case-insensitive alphabetic characters and numeric digits that occur more than once in the input string. The input string can be assumed to contain only alphabets (both uppercase and lowercase) and numeric digits.
Example
"abcde" -> 0 # no characters repeats more than once
"aabbcde" -> 2 # 'a' and 'b'
"aabBcde" -> 2 # 'a' occurs twice and 'b' twice (`b` and `B`)
"indivisibility" -> 1 # 'i' occurs six times
"Indivisibilities" -> 2 # 'i' occurs seven times and 's' occurs twice
"aA11" -> 2 # 'a' and '1'
"ABBA" -> 2 # 'A' and 'B' each occur twice
Strings
Fundamentals
Similar Kata:
Stats:
Created | Jan 21, 2015 |
Published | Jan 21, 2015 |
Warriors Trained | 503882 |
Total Skips | 62477 |
Total Code Submissions | 897938 |
Total Times Completed | 243492 |
Python Completions | 94647 |
JavaScript Completions | 76291 |
Ruby Completions | 7392 |
Haskell Completions | 1780 |
C# Completions | 14784 |
Elixir Completions | 560 |
Shell Completions | 411 |
C++ Completions | 6835 |
Java Completions | 21321 |
Clojure Completions | 473 |
R Completions | 410 |
Go Completions | 4080 |
C Completions | 2817 |
Kotlin Completions | 2292 |
Scala Completions | 784 |
PHP Completions | 4136 |
CoffeeScript Completions | 27 |
PureScript Completions | 27 |
TypeScript Completions | 4437 |
Julia Completions | 113 |
F# Completions | 144 |
Swift Completions | 1266 |
Dart Completions | 1107 |
Rust Completions | 2103 |
NASM Completions | 28 |
Crystal Completions | 28 |
Racket Completions | 41 |
Groovy Completions | 55 |
COBOL Completions | 10 |
D Completions | 4 |
Lua Completions | 32 |
Total Stars | 4643 |
% of votes with a positive feedback rating | 90% of 20285 |
Total "Very Satisfied" Votes | 16593 |
Total "Somewhat Satisfied" Votes | 3346 |
Total "Not Satisfied" Votes | 346 |