Codeflies Interview Question

Coding question of Star pattern