As for the recursion, notice the pattern in the right column I listed above. Each result is the same as the result above it plus one more. In other words, you can rewrite a + b + c + d as sum(arr, 3) + d, likewise, you can rewrite a + b + c as sum(arr, 2) + c, and so on…