Cognizant Interview Question

about the coding section