Pregunta de entrevista de Shopee

Recursion question on an 1D array