Running Sum Of 1d Array Leetcode