1
Answer

Add possible combinations of r elements in a given array

Ashish Sahu

Ashish Sahu

9y
429
1
Hi Experts,
 
Add  all possible combinations of r elements in a given array of size n

Example: is input array     
int[] arr = new int[] { 1, 2, 3, 4, 5,6 };
output:  possible combination of arrary below:
1+4+5=10
2+3+5 =10
1+2+3+4=10
6+4=10
6+1+3=10

please help me

Thanks & Regards
Ashish Kumar Sahu 
Answers (1)