Java | easier bitmask solution
Upvote if you find this easier than the editorial.\n```\npublic int findComplement(int num) {\n\tint mask= 1;\n\twhile(num>mask) mask= (mask<<1) | 1;\n\treturn 
Upvote if you find this easier than the editorial.\n```\npublic int findComplement(int num) {\n\tint mask= 1;\n\twhile(num>mask) mask= (mask<<1) | 1;\n\treturn num^mask;\n}
[]