Practice problems from the book, Cracking the Coding Interview, by Gayle Laakmann McDowell