CrimsonLogic interview question

Java 8 features, one DSA algo question