Capgemini Interview Question

1. Basic coding