Wiley Interview Question

Question on DSA,Sql and java 8