Flipping bits

  • + 0 comments

    C++ Solution

    long flippingBits(long n) {
        return ~((unsigned)n);
    }