Codeeval solutions in Scala