Capgemini Invent interview question

not much difficult.