3120. Count the Number of Special Characters I
3120. Count the Number of Special Characters I
Description
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:
1 | Input: word = "aaAbcBC" |
Example 2:
1 | Input: word = "abc" |
Example 3:
1 | Input: word = "abBCab" |
Constraints:
1 <= word.length <= 50
word
consists of only lowercase and uppercase English letters.
Hints/Notes
- N/A
Solution
Language: C++
1 | class Solution { |