Xtreme Softech interview question

Star Pattern tricky