Capgemini interview question

Java 8 Functional Programming Code optimization