2025-08-20 19:24:46 +0300 MSK
Count the Number of Vowel Strings in Range
Links
Code
class Solution:
def vowelStrings(self, words: List[str], left: int, right: int) -> int:
res = 0
vowels = ("a", "e", "i", "o", "u")
for i in range(left, right + 1):
word = words[i]
if word[0] in vowels and word[-1] in vowels:
res += 1
return res