Cognizant interview question

Technical questions and logical programming