Vistaar Technologies Interview Question

Star pattern coding question. Arrays