Skip to content

Instantly share code, notes, and snippets.

@vrat28
Created May 3, 2021 08:41
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/cf3e4145d3e7c27c8032e968c789fae8 to your computer and use it in GitHub Desktop.
Save vrat28/cf3e4145d3e7c27c8032e968c789fae8 to your computer and use it in GitHub Desktop.
class Solution {
public int[] runningSum(int[] nums) {
for (int i = 1; i < nums.length; 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