Ctrl K
Problem

Balance After Each Day

Easy · Balance After Each Day

An account is opened with a zero balance. The array `changes` records how much the balance moved on each day: a positive number is a deposit, a negative one is a withdrawal. Return an array of the same length whose `i`-th element is the balance at the end of day `i`, that is, `changes[0] + changes[1] + … + changes[i]`.…

Solve the problem →