about | help | code help+videos | done | prefs |
recur_sumArray
Given an integer array named "arr", recursively calculate the sum of all of the numbers in the array. The method will be sent the array to calculate the sum of, an integer "index", which will always start at 0 and keep track of which spot you are currently on. recur_sumArray([1, 2, 3], 0) → 6 recur_sumArray([2, 2, 2], 0) → 6 recur_sumArray([1, 2, 1, 2, 1, 2], 0) → 9 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Copyright Nick Parlante 2017 - privacy