Capgemini Engineering interview question

scenario