ALG-E007EasyStrings
Vowel Counter
Count the English vowels a, e, i, o, u in text. Uppercase and lowercase vowels count equally; y does not count.
Contract
input text: string
return integer
Constraints
- • Input uses ASCII characters
- • 0 <= text length <= 1000
Examples
Example 1
text = "Algorithm"
→ 3
5 judge tests (2 shown above). Target complexity: O(n).