about | help | code help+videos | done | prefs |
Write a method that keeps a "running sum" of all the numbers in the input parameter array and returns an array of that "running sum". The input parameter array will contain at least one number. The first number of the resulting array will always be the same as the first number in the original array. After that, only add numbers that are greater than 10. So the "running sum" stays the same unless the number in the original array is greater than 10. Look at the test data for examples. sep27_2016_SLHL_runningSum([4, 7, 20, 15, 2, 4, 7]) → [4, 4, 24, 39, 39, 39, 39] sep27_2016_SLHL_runningSum([5]) → [5] sep27_2016_SLHL_runningSum([17, 40, 100, 200]) → [17, 57, 157, 357] ...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: 290
Copyright Nick Parlante 2017 - privacy