Search
⌘K
Get Premium
Leetcode 1371. Find the Longest Substring Containing Vowels in Even Counts
Find the length of the longest substring where each vowel (a, e, i, o, u) occurs an even number of times. This is typically solved in O(n) by tracking the parity of the five vowels with a bitmask and remembering the earliest index each parity-state appeared to compute maximal substring lengths.
Question Timeline
See when this question was last asked and where, including any notes left by other candidates.
All Regions
Comments
Hello Interview Premium
Your account is free and you can post anonymously if you choose.