C++ One Line Solution 100% faster 0ms
\nclass Solution {\npublic:\n    int bitwiseComplement(int N) \n    {\n        return N == 0 ? 1 : N ^ (int)(pow(2, floor(log2(N)) + 1) - 1);\n    }\n};\n
```\nclass Solution {\npublic:\n    int bitwiseComplement(int N) \n    {\n        return N == 0 ? 1 : N ^ (int)(pow(2, floor(log2(N)) + 1) - 1);\n    }\n};\n```
['C', 'C++']