Modelon interview question

Sum of all sub array of array