PickMe Interview Question

To do a code for a star pattern