Indmax Interview Question

java program to print patterns. aptitude round logical round.