Ruby implementations of programming questions from Cracking The Code book