TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Pruthvi Patel
NA
129
23.7k
Split and sum array like below
Dec 1 2016 3:52 AM
arr[]={
1,3,2,4,6,7,8,9,10
,
11,12,16,5,8,7,8,4,6
};
split=2; // the arr[] will be divide in 2(no of splits) parts each with equal elements
split=1,2,3...n
skip=2; // skip is no of element to be skipped.
skip=1,2,3...n
size of res[] should be accordingly.
then
res[0]=15 //1+4+8
res[1]=18//3+6+9
res[2]=19 //2+7+10
res[3]=24 //11+5+8
res[4]= 24 //12+8+4
res[5]= 29//16+7+6
and like wise split can be 1 to n.
arr[]={1,2,3...n}
elements
This should be dynamically.
Please help me to do this.
Thanks
Reply
Answers (
2
)
Obtaining value an Enum from a gridview (Entity Framework)
How to import csv file to SQL server