Skip to content

Files

Latest commit

 

History

History

2016.9.5Counting Duplicates

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Count the number of Duplicates

Write a function that will return the count of distinct case-insensitive alphabetic characters that occur more than once in the given string. The given string can be assumed to contain only digits and uppercase and lowercase alphabets.

Example

"abcde" -> 0 # no characters repeats more than once "aabbcde" -> 2 # 'a' and 'b' "aabbcdeB" -> 2 # 'a' and 'b' "indivisibility" -> 1 # 'i' "Indivisibilities" -> 2 # 'i' and 's'

Finish the solution so that it returns the sum of all the multiples of 3 or 5 below the number passed in.

Courtesy of ProjectEuler.net