Bloomberg Interview Question

Given an Array, fold the array N times.