Indmax interview question

java program to print patterns. aptitude round logical round.