Finding the sum of an array using recursion

I am learning recursion in my java class, and I am supposed to find the sum of a given array using recursion. The trick is I cannot change that Method header. I'm not sure where to start.

public static int sum(int[] a, int left, int right) {

Read more here:

Content Attribution

This content was originally published by Jacob Moore at Recent Questions - Stack Overflow, and is syndicated here via their RSS feed. You can read the original post over there.

%d bloggers like this: