Capgemini Engineering interview question

Everything was as expected