Flipping bits

  • + 1 comment

    Python solution using XOR operator

    def flippingBits(n):
        return  n ^ (2**32 - 1)