Why still so slow


  • 0
    S

    I tested three implementations:

    1. n % 4 != 0
    2. n>>2<<2 != n
    3. (n&3) != 0
      However, all the ways would beat only 6.28% users in running time. So I wonder what's the fastest method.

  • 0

    "Why still so slow [...] all the ways would beat only 6.28% users in running time."

    You're joking, right? Your runtime is 0 ms, same as 93.72%.


  • 0
    S

    sorry, I made a wrong understanding....


Log in to reply
 

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