Approach hintTry it first, then revealHide
Each output value is the previous output plus the current element, so a single pass suffices; the input array can even be overwritten in place.
Each output value is the previous output plus the current element, so a single pass suffices; the input array can even be overwritten in place.