Bit operations problems from Chapter 5 of the "Cracking the coding
interview" book