Cognizant interview question

coding problems question easy level