Cognizant interview question

Data structure - Java 8 Stream