My solution to CodeEval challenges