do more faster by C++

  • -1

    most of us finally realised answer that N can or not be divisible by 4.
    so, use bit-operation can be faster.

    class Solution
    bool canWinNim(int n)
    return n&3;

Log in to reply

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