Cognizant Interview Question

Data structure - Java 8 Stream