Pregunta de entrevista de IBM

don't remember the question but its basic algorithmic questions