about | help | code help+videos | done | prefs |
Wrtie a method that returns an array representing the "running sum" of the numbers in the input array. For example: {4, -2, 6, 1, 3} returns {4, 2, 8, 9, 12} because 4+(-2)=2, then 2+6=8, then 8+1=9, then 9+3=12. Look at the test data for further examples. The input array will contain at least one number. oceanRunningSum([5]) → [5] oceanRunningSum([2, 5, -3, -1]) → [2, 7, 4, 3] oceanRunningSum([1, 1, 1, 1, 1, 1, 1]) → [1, 2, 3, 4, 5, 6, 7] ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 280
Copyright Nick Parlante 2017 - privacy