XYZ Interview Question

Pattern printing (triangle pattern with star and dot)