1480. Running Sum of 1d Array
https://leetcode.com/problems/running-sum-of-1d-array/
Python
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
total = 0
for i, num in enumerate(nums):
nums[i] += total
total += num
return nums