Angular Minds Interview Question

Coding question on pattern programs