You are viewing a single comment's thread. Return to all comments →
Thanks very much for this!
My initial implementation was timing out - too crude :/
This is MUCH better:
def flippingBits(n): flipped_n=(pow(2,32)-1)-n return flipped_n
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 →
Thanks very much for this!
My initial implementation was timing out - too crude :/
This is MUCH better:
def flippingBits(n): flipped_n=(pow(2,32)-1)-n return flipped_n