#3227

Vowels Game in a String

pupil · 490 · lc medium +27 · 77.1% accepted · 551 likes · top 88%

Description

Alice and Bob play a game on string s, Alice going first.

- Alice must remove a non-empty substring with an odd number of vowels.

- Bob must remove a non-empty substring with an even number of vowels.

The player who cannot move loses. Return true if Alice wins with optimal play.

Vowels are: a, e, i, o, u.

Code

1
2
3