Cognizant interview question

programing