# 476. Number Complement

#### Question

Given a positive integer, output its complement number. The complement strategy is to flip the bits of its binary representation.

#### Pseudo code

- 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

#### Playground

See the Pen #476 Number Complement by Cherry Wang (@chryw) on CodePen.