Solutions to Codeeval problems