728x90
https://leetcode.com/study-plan/leetcode-75/
https://leetcode.com/problems/running-sum-of-1d-array
var runningSum = function(nums) {
let answer = [];
answer.push(nums[0]);
for(let i = 1; i<nums.length; i++ ){
answer.push(answer[i-1] + nums[i]);
}
return answer
};
728x90