Rakuten interview question

How would you go about solving this issue …