LeetCode 476: Number Complement
Problem Restatement We are given a positive integer num . We need to flip every bit in its binary representation: Bit After flip 0 1 1 0 Then we return the decimal value of the flipped binary number. For example, 5 in binary is: 101 After flipping every bit: 010 010 in binary is 2 , so the answer is 2 . The problem uses the normal binary representation without...