Running Sum of 1d Array
ID: 1480; easy
Solution 1 (Java)
A little teaser for DP.
Solution 2 (Java)
The separate array is not actually needed. We can do the adding process in place. The complexities stay the same though.
Time complexity:
O(n)
Space complexity:
O(1)
Last updated