3121. Count the Number of Special Characters II
You are given a string
word
. A letterc
is called special if it appears both in lowercase and uppercase inword
, and every lowercase occurrence ofc
appears before the first uppercase occurrence ofc
.Return the number of special letters in
word
.
c++
1 | class Solution { |