C++ | 100% faster | Beginner friendly | Simple Math
\nint bitwiseComplement(int n) {\n        int i;\n        for(i=0;i<=n;)\n        {\n            i=(i*2)+1;\n            if(n<=i)\n                break;\n     
```\nint bitwiseComplement(int n) {\n        int i;\n        for(i=0;i<=n;)\n        {\n            i=(i*2)+1;\n            if(n<=i)\n                break;\n        }\n        return i-n;    \n    }\n```\t\n\n\n**If you have some doubts feel free to ask me.**\nIt\'s my first post on leetcode.If you like it please upvote.
['Math', 'C']