Running Sum of 1D Array
Easy1 ptArrayPrefix Sum
PrerequisitesArray, Prefix Sum
Given an array nums, return its running (prefix) sum, where runningSum[i] = sum(nums[0..i]).
Input: space-separated integers.
Output: space-separated running sums.
Hints
Video
8 lines
Input (stdin)
Expected output · optional
Run checks your code against every example, one by one — all must pass. Type your own input above to run that instead (Run compares it to the expected output if you set one). The full suite is checked on Submit — a failing case reveals its input & expected output.
