GroMo Interview Question

Dsa for Star pattern problem