Pregunta de entrevista de Standard Chartered Bank

Problem and how you solved it