Cognizant interview question

Very Difficult Questions on Threading