about | help | code help+videos | done | prefs |
Write a method that returns the array 'nums' but with all the negative numbers replaced with the sum of all the previous non-negative values in the array. Look at the test data for examples. test2023_01_19_SLHL_replaceNegsRunningSum([18]) → [18] test2023_01_19_SLHL_replaceNegsRunningSum([-1]) → [0] test2023_01_19_SLHL_replaceNegsRunningSum([-220]) → [0] ...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: 250
Copyright Nick Parlante 2017 - privacy