Pruthvi Patel

Pruthvi Patel

  • NA
  • 129
  • 23.7k

Split an array like below.

Oct 31 2016 8:27 AM
arr[]={1,2,3,4,5,6,6,7,6,5,4,3,7,8,8,8,4,3,2,8....n}
split=2  
sum=2
then the result array should be like this.
res[0]=47     //1+2+5+6+6+5+7+8+4+3 
res[1]=53    //3+4+6+7+4+3+8+8+2+8 
Please help me to do this. 

Answers (9)