Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
I believe that shaunpatterson's solution is O(n). The counting of occurences of each character with the for loop is O(n). Then we traverse the (character, count) pairs to find the characters that appear more than once. This is O(1) because there is at most 36 characters (26 alphabets and 10 digits). Finally, we count the characters that appear more than once, which is again O(1). So we have that the whole thing is O(n) + O(1) + O(1) = O(n).
I think yours is O(n^2) for worst case too, because once you look at all the chars of text, then you check all the elements of your dict.