Capgemini Engineering interview question

There was also coding in paper