My C# solution to the questions in Cracking the Coding Interview