JAVA One Liner 100% Faster Solution || Explaination
\n\nn                                =    10  decimal \nn                                =    ...001010\n~n                               =    ...110101\nIntege
\n```\nn                                =    10  decimal \nn                                =    ...001010\n~n                               =    ...110101\nInteger.highestOneBit(n)         =    ...001000\nInteger.highestOneBit(n)-1       =    ...000111\n~n & Integer.highestOneBit(n)-1  =    ...000101\n\n```\n\n\n\n\n**SOLUTION:**\n```\nclass Solution {\n    public int bitwiseComplement(int n) {\n        return n==0?1: ~n & Integer.highestOneBit(n)-1;\n    }\n}\n```
['Java']