arr[]={1,2,3,4,5,6,6,7,6,5,4,3,7,8,8,8,4,3,2,8,6,5,3,4....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.
if
split=3
sum=2 then
res[0]= 41 //1+2+6+7+7+8+2+8
res[2]= 45 //3+4+6+5+8+8+6+5
res[3]= 32 //5+6+4+3+4+3+3+4
res[] should be vary with split if split is 4 then res[4] should be also there.this should be dynamically
value of sum and split is vary between 1 to n.
please help me to do this.
Thanks
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Manas MohapatraPosted Nov 2, 2016, 5:54 AM
Midhun TpPosted Nov 2, 2016, 5:54 AM