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
- Discussions
Flipping bits
Flipping bits
Sort by
recency
|
166 Discussions
|
Please Login in order to post a comment
Solution in php:
function flippingBits($n) {
}
public static long GetFlippingBits(long n) { uint binary = (uint)n; return ~binary; }
uint binary = (uint)n; return ~binary;
i mean we can just return ~n & 0xFFFFFFFF.........thats it....you are all set