ValueLabs interview question

Java 8 streams