Cognizant interview question

Stream API related questions and code