Pergunta de entrevista da empresa Amplework Software

Need to solve the Star pattern