about | help | code help+videos | done | prefs |
The "partial sum" of an array is the sum of all the elements from position 0 to position n in the array. For example, the partial sum of the array {3, 4, 2} is {3, 7, 9} (the 7 is the result of 3+4, the 9 is the result of 3+4+2). Write a method that accepts an array of integers and returns the array of partial sums. quizSLAPHL_P4([3, 5, 2, 0, 1, 4]) → [3, 8, 10, 10, 11, 15] quizSLAPHL_P4([3, 7, 9, 10]) → [3, 10, 19, 29] quizSLAPHL_P4([5]) → [5] ...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: 210
Copyright Nick Parlante 2017 - privacy