class Solution:
    def maxVowels(self, s: str, k: int) -> int:
        q = collections.deque(s[:k])
        vowel = ['a', 'e', 'i', 'o', 'u']

        count = 0
        max_count = 0

        for v in vowel:
            count += s[:k].count(v)
            max_count = max(max_count, count)

        i = k
        while i < len(s):
            if q.popleft() in vowel:
                count -= 1
            
            x = s[i]
            q.append(x)
            if x in vowel:
                count += 1
                max_count = max(max_count, count)
                if count == k:
                    return k
            i = i + 1

        return max_count