...

/

Solution Review: Sum of Lists

Solution Review: Sum of Lists

Let’s go over the solution for the challenge: Sum of Lists.

Task

In this challenge, you had to create a recursive function, sum, which sums together all the integers in a list.

Solution

A skeleton of the function was already provided for you. Let’s look it over.

int sum(List<int> numberList, int index) { 

}

sum takes two parameters. The first is a list of type List<int> and the second is the index ...