Running Sum of 1D Array
Updated Feb 24, 2026
Problem
Return running sum of nums.
Constraints
1 <= nums.length <= 1000
Examples
Example 1
Input:
{"nums": [1, 2, 3, 4]}
Output:
[1, 3, 6, 10]
Function Signature
def runningSum(self, nums: list[int]) -> list[int]
How to Submit
Implement a Solution class with a runningSum method.
Your method will be called with the input parameters and should return the answer.