Cognizant interview question

Logical Reasoning