We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Flipping bits
Flipping bits
Sort by
recency
|
781 Discussions
|
Please Login in order to post a comment
long flippingBits(long n) { return 4294967295-n; }
Here is my c++ solution, you can watch the video explanation here : https://youtu.be/eZ0lTIzOjhQ
V1
V2
def flippingBits(n): num = ~n return 4294967296 + num
Here is my Python solution!