Flipping bits

  • + 0 comments

    JAVA solution:

    public static long flippingBits(long n) {
            return ~n & 0xFFFFFFFFL;
        }