Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.
- parse integer to binary
- store every digit into to an array
- invert every item in array to the opposite
- merge the inverted array
- parse back to integer