Posted on

Description

Submission

class Solution {
public:
    vector<int> runningSum(vector<int>& nums) {
        for(int i = 1; i < nums.size(); ++i) {
            nums[i] += nums[i-1];
        }
        return nums;
    }
};

Leave a Reply

Your email address will not be published. Required fields are marked *