Leetcode 5453. Running Sum of 1d Array
2 min readJun 14, 2020
In this Leetcode problem, we are asked to return the sum
array given an nums
array where sum[i] = sum(nums[0],…, nums[i])
Solution
A few ideas for this problem:
- We will use the input array and modify it, and return it as the solution. That way, we don’t have to create a new array.
- We will build a loop such that…