Cognizant interview question

multi threading implementation