Find the Longest Substring Containing Vowels in Even Counts

Given a string s, return the length of the longest substring where each vowel appears an even number of times.

Constraints

  • 1 <= s.length <= 5 x 10^5
  • s contains only lowercase English letters.
Saving… · 3 lines
class Solution:
def findLongestSubstringWithEvenVowels(self, s: str) -> int:

Console

Click Run to execute sample tests.