Python 1 line solution


  • 0
    S

    Alternative way to choose True/False without casting.

    class Solution(object):
        def canWinNim(self, n):
            return True if n % 4 else False

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.