IDEA Foundation interview question

wap to print pyramid pattern