[ Web Proxy ]
URL:
Viewing: https://raw.githubusercontent.com/avinashbest/java-coding-ninjas/master/recursion1/ArraySum.java [Back]  [Original]

package recursion1;

import java.util.Scanner;
/*Given an array of length N, you need to find and return the sum of all elements of the array.
Do this recursively.
Input Format :
Line 1 : An Integer N i.e. size of array
Line 2 : N integers which are elements of the array, separated by spaces
Output Format :
Sum
Constraints :
1 

Web Proxy Viewer  |  New URL  |  Original Page