Shortest Possible Solution (Python)


  • 0
    A

    class Solution(object):
    def canWinNim(self, n):
    return (n%4)!=0

    Because there is a WWWL,WWWL,...,WWWL pattern


Log in to reply
 

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