Pregunta de entrevista de Meta

A cumsum array problem, don't remember the exact question