Question

Write a function that creates a cumulative sum array?

Login to Submit

Examples

Input: [4, 3, 2, 1]
Output: [4, 7, 9, 10]

Input: [5, 1, 7]
Output: [5, 6, 13]