Audit the Vowel Density

Basic

A text-analytics step scores how "pronounceable" a token is by counting its vowels. Build the counter it relies on.

Implement `solve(String input)` (lowercase) to return the number of vowels (a, e, i, o, u) it contains.

Examples

Input"salesforce"
Output4
Input"rhythm"
Output0
Hints
  • Build a Set of vowel characters and check membership while looping characters.
Anonymous Apex

Your code runs in a secure sandbox against multiple hidden test cases. The problem is solved only when every test passes. Each run is isolated and any data changes are rolled back automatically.