Capgemini Engineering interview question

Puzzles