Rakuten Interview Question

DSA Easy question in 1st round