Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit e17bc47

Browse files
Create Question
1 parent 05cb2f8 commit e17bc47

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
3120. Count the Number of Special Characters I
2+
3+
You are given a string word. A letter is called special if it appears both in lowercase and uppercase in word.
4+
5+
Return the number of special letters in word.
6+
7+
8+
9+
Example 1:
10+
11+
Input: word = "aaAbcBC"
12+
13+
Output: 3
14+
15+
Explanation:
16+
17+
The special characters in word are 'a', 'b', and 'c'.
18+
19+
Example 2:
20+
21+
Input: word = "abc"
22+
23+
Output: 0
24+
25+
Explanation:
26+
27+
No character in word appears in uppercase.
28+
29+
Example 3:
30+
31+
Input: word = "abBCab"
32+
33+
Output: 1
34+
35+
Explanation:
36+
37+
The only special character in word is 'b'.
38+
39+
40+
41+
Constraints:
42+
43+
1 <= word.length <= 50
44+
word consists of only lowercase and uppercase English letters.

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /