Nisum Interview Question

java 8 lemda function implementation to compare and sort array