Practice Vowels Game in a String
Read the task, work through the examples, and check your approach against the constraints. Use the original LeetCode task for coding and submissions.
Problem Statement
Alice and Bob alternate removing nonempty contiguous substrings from s, with Alice moving first. Alice must remove a substring containing an odd number of vowels, while Bob must remove one containing an even number, including zero. The player with no legal move loses. With both playing optimally, return whether Alice wins. The vowels are a, e, i, o, and u.
Source: Vowels Game in a String on LeetCode. Use the original task for its coding environment and submissions.
Examples
# Example 1
s = "leetcoder"
true
# Example 2
s = "bbcd"
false
Constraints
Related LeetCode Problems
Practice more problems similar to Vowels Game in a String.
Review your practice with PhantomCodeAI
After trying the problem yourself, use the app to discuss your approach, complexity, and edge cases.