Pregunta de entrevista de Rakuten

How would you go about solving this issue …