mirror of
https://github.com/devenperez/leetcode.git
synced 2026-06-13 14:57:08 +00:00
10 lines
259 B
Python
10 lines
259 B
Python
class Solution(object):
|
|
def runningSum(self, nums):
|
|
"""
|
|
:type nums: List[int]
|
|
:rtype: List[int]
|
|
"""
|
|
sum = [nums[0]]
|
|
for i in range(1, len(nums)):
|
|
sum.append(sum[i-1] + nums[i])
|
|
return sum |