You are viewing a single comment's thread. Return to all comments →
def flippingBits(n): num_bits = 32 mask = (1 << num_bits) - 1 ans = mask - n return ans
Seems like cookies are disabled on this browser, please enable them to open this website
Flipping bits
You are viewing a single comment's thread. Return to all comments →