Practice Find the Longest Substring Containing Vowels in Even Counts
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Medium#1371
LeetCode ProblemFind the Longest Substring Containing Vowels in Even Counts
Problem Statement
Given the string s, return the size of the longest substring containing each vowel an even number of times. That is, 'a', 'e', 'i', 'o', and 'u' must appear an even number of times.
Source: Find the Longest Substring Containing Vowels in Even Counts on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
Input
s = "eleetminicoworoep"
Output
13
# Example 2
Input
s = "leetcodeisgreat"
Output
5
# Example 3
Input
s = "bcbcbc"
Output
6
Constraints
1 <= s.length <= 5 x 10^5
s contains only lowercase English letters.
Related LeetCode Problems
Practice more problems similar to Find the Longest Substring Containing Vowels in Even Counts.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.