Nagarro interview question

Related to multi threading and optimization