Skip to content

Instantly share code, notes, and snippets.

@praveeng1618
Created January 15, 2024 04:31
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 praveeng1618/298716654296c46cc435b04ebe2d525b to your computer and use it in GitHub Desktop.
Save praveeng1618/298716654296c46cc435b04ebe2d525b to your computer and use it in GitHub Desktop.
1480. Running Sum of 1d Array Leetcode
class Solution:
def runningSum(self, nums: List[int]) -> List[int]:
Sum = 0
for i in range(0,len(nums)):
Sum = Sum + nums[i]
nums[i] = Sum
return nums
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment