1480. Running Sum of 1d Array
Easy
Given an array nums
. We define a running sum of an array as runningSum[i] = sum(nums[0]…nums[i])
.
Return the running sum of nums
.
Example 1:
Example 2:
Example 3:
Constraints:
1 <= nums.length <= 1000
-10^6 <= nums[i] <= 10^6
解法
Previous1472. Design Browser HistoryNext1491. Average Salary Excluding the Minimum and Maximum Salary
Last updated