Pregunta de entrevista de Sumitomo Mitsui Financial Group

Write efficient code, and explain your thought process