Pregunta de entrevista de Thoughtworks

The most difficult part was both logic and code test.