FastPrepFastPrep
Problem Brief

Count Characters Before Uppercase

FULLTIMEOA

Given a string of letters, containing both uppercase and lowercase letters, return the number of different characters where all lowercase of that character appear before any uppercase letter.

1Example 1

Input
s = "aaAbcCABBc"
Output
2
Explanation

Here the output is 2, a and b, c iss not counted.

public int countCharactersBeforeUppercase(String s) {
  // write your code here
}
Input

s

"aaAbcCABBc"

Output

2

Sign in to submit your solution.