Skip to content

Instantly share code, notes, and snippets.

@vrat28
Created May 3, 2021 08:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vrat28/401c723a45312f63dee9bfe1074149d7 to your computer and use it in GitHub Desktop.
Save vrat28/401c723a45312f63dee9bfe1074149d7 to your computer and use it in GitHub Desktop.
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
for i in range (1, len(nums)):
nums [i] = nums [i] + nums [i-1]
return nums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment