Squarespace Interview Question

LC Reccursion and Arrays problem