Given an array, return a new array where each element is the sum of itself and every element before it.
Example 1
Explanation: Each output value is the sum of nums[0..i]: 1, 1+2, 1+2+3, 1+2+3+4.
Example 2
Example 3
Code execution is coming soon.