Capgemini Engineering interview question

Logic puzzles