Capgemini Interview Question

DSA question asked on simple topics with my introduction