Count the Number of Special Characters I
You are given a string word. A letter is called special if it appears both in lowercase and uppercase in word.
Return the number of special letters in word.
Example 1
Input
word = "aaAbcBC"Output
3The special characters in
word are 'a', 'b', and 'c'.Example 2
Input
word = "abc"Output
0No character in
word appears in uppercase.Constraints
- 1 <= word.length <= 50
- word consists of only lowercase and uppercase English letters.