2062. Count Vowel Substrings of a String
On This Page
class Solution:
def countVowelSubstrings(self, word: str) -> int:
s = set('aeiou')
res, n = 0, len(word)
for i in range(n):
t = set()
for c in word[i:]:
if c not in s:
break
t.add(c)
res += len(t) == 5
return res