Fanatics interview question

Bit manipulation