Ruby solutions to CodeEval problems