Aspire Systems interview question

zigzag pattern