Pregunta de entrevista de Amplework Software

Need to solve the Star pattern