Dsa
Sliding Window
Medium
Maximum Number of Vowel Substrings
Given a string s, count the maximum number of contiguous substrings that consist of vowels only. Each substring must be at least of length 1. The input consists of a single line containing the string s. Output a single integer representing the maximum number of contiguous vowel substrings.
Example:
Input:
aeioubcdeoa
Output:
5
Key concepts
sliding_windowstrings
Practise this out loud — free
Start a mock interview on THIS exact question — a voice AI interviewer opens with it, pushes back like a real onsite, then hands you an instant scorecard.
🎙 Practise this question now