Cognizant interview question

Collection utility