Pregunta de entrevista de Luxoft

Coderbyte algorithm test has 2 basic question