Pregunta de entrevista de Kantar

I have been asked to work on a programming problem for an hour.