• + 0 comments

    your solution is not memory-efficient since you don't need an array. On each array step save maximum of the currenct sum and calculated one to sum.