题目描述
Given a string. Count the number of Camel Case characters in it.
Example 1:
Input:
S = "ckjkUUYII"
Output: 5
Explanation: Camel Case characters present:
U, U, Y, I and I.
ââ¬â¹Example 2:
Input:
S = "abcd"
Output: 0
Explanation: No Camel Case character
present.
Your Task:
You don't need to read input or print anything. Your task is to complete the function countCamelCase() which takes the string S as input and returns the count of the camel case characters in the string.
Expected Time Complexity: O(|S|).
Expected Auxiliary Space: O(1).
Constraints:
1<=|S|<=10^{5}
输入格式
见题面
输出格式
见题面
样例输入
S = "ckjkUUYII"
样例输出
5