C++ 100% bitset
\nclass Solution {\npublic:\n    int findComplement(int num) {\n        bitset<32> b(num);\n        int pos=32;\n        while(!b[--pos]);\n        while(pos>-1
```\nclass Solution {\npublic:\n    int findComplement(int num) {\n        bitset<32> b(num);\n        int pos=32;\n        while(!b[--pos]);\n        while(pos>-1) b.flip(pos--);\n        return b.to_ulong();\n    }\n};\n```
['C']