Pregunta de entrevista de Bloomberg

Programming question since I do not have a computing background