Skip to content
LC-3227 Medium LeetCode

3227. Vowels Game in a String

Read the full problem statement on LeetCode.
Difficulty: medium Acceptance: 62% Topics: Math, String, Brainteaser, Game Theory
View full problem on LeetCode
Reference solution (spoiler · python)
# Time:  O(n)
# Space: O(1)

# math
class Solution(object):
    def doesAliceWin(self, s):
        """
        :type s: str
        :rtype: bool
        """
        return any(x in "aeiou" for x in s)

Solution from kamyu104/LeetCode-Solutions · MIT