Count the Number of Vowel Strings in Range
You are given a 0-indexed array of strings words and two integers left and right.
A string is called a vowel string if it starts with a vowel character and ends with a vowel character, where vowel characters are 'a', 'e', 'i', 'o', and 'u'.
Return the number of vowel strings words[i] where i belongs to the inclusive range [left, right].
Example 1
Input
words = ["are","amy","u"], left = 0, right = 2Output
2"are" and "u" are vowel strings in the range, while "amy" is not because it does not end with a vowel.
Example 2
Input
words = ["hey","aeo","mu","ooo","artro"], left = 1, right = 4Output
3"aeo", "ooo", and "artro" are vowel strings in the range, while "mu" is not because it does not start with a vowel.
Constraints
- 1 <= words.length <= 1000
- 1 <= words[i].length <= 10
- words[i] consists of only lowercase English letters.
- 0 <= left <= right < words.length