Rakuten Interview Question

How would you go about solving this issue …