LeetCode Problems' Solutions
For bit manipulation in Python, if 32-bit integer is need, you can use this code snippet:
def get_int32(a):
return a if a >> 31 <= 0 else a ^ ~0xFFFFFFFF
LeetCode Problems' Solutions
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
LeetCode Problems' Solutions
For bit manipulation in Python, if 32-bit integer is need, you can use this code snippet:
def get_int32(a):
return a if a >> 31 <= 0 else a ^ ~0xFFFFFFFF
LeetCode Problems' Solutions