IndiaFilings.com interview question

Triangle star pattern and triangle number patterns