Cognizant interview question

Design patterns