Pregunta de entrevista de J.P. Morgan

a programming question based on java