Capgemini Engineering Interview Question

scenario