Cognizant interview question

Logical reasoning and coding questions