Login2Xplore interview question

Java program for number patterns