Running sum

[3, 1, 4] → [3, 4, 8]

You can also choose a level by clicking a star.

About the course

Description
Each element of the array is replaced by the sum (or the maximum) of all elements up to it
More information
An algorithm is a precise sequence of steps. Code examples are in Python.
Sample question
[3, 1, 4] → [3, 4, 8]
Author
Jiří Preisler
Version
1.0