Answers to exercises from Cracking the Coding Interview