30:00
Given an array nums, define its running sum as runningSum[i] = sum(nums[0]...nums[i]). Return the running sum of nums.
1≤nums.length≤10001 \leq \text{nums.length} \leq 10001≤nums.length≤1000
−106≤nums[i]≤106-10^6 \leq \text{nums}[i] \leq 10^6−106≤nums[i]≤106
Run code to see results.
each number is a step; the running sum is the height you reach
Read each of the 4 numbers as a step up (positive) or down (negative). The running sum is the height after each step.
Return an array where position i holds nums[0] + nums[1] + ... + nums[i], the total of everything up to and including index i.