Pregunta de entrevista de FactSet

code review didn't give Java option