Skip to content

Commit 4c5e2a1

Browse files
authored
Merge pull request vJechsmayr#582 from tejasvicsr1/feature/tjsv
Solution to problem 1480 vJechsmayr#579
2 parents 16d3094 + 8feaafa commit 4c5e2a1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
class Solution:
2+
def runningSum(self, nums: List[int]) -> List[int]:
3+
ans = []
4+
ans.append(nums[0])
5+
for i in range(1, len(nums)):
6+
ans.append(ans[i-1] + nums[i])
7+
return ans

0 commit comments

Comments
 (0)