Cognizant interview question

Hooks, context