Why is "n>>1" and "n/2" bahave differently when (n==INT_MAX)??


  • -1
    L

    INT_MAX == 0x7fffffff, and INT_MAX >> 1 should be 0x3fffffff, but "n >> 1 " runtime error but "n/2" get AC. Could anyone explain it?


Log in to reply
 

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