Answers for chapter 1 of Cracking the Coding Interview Questions