i have just started learning C++,this is my first programming language.
but i was solving some question in array,but this one was a problem to me.
here it goes.
create array,in that array find sub arrays(subset),
in which there is a maximun number in increasing order.
for example array below
10 1 2 3 0 5 2 8 6 1 9 11 12 13.
the subsets in increasing order will be
1 2 3
0 5
2 8
1 9 11 12 13
so from above example,the longest is
1 9 11 12 13
how can i do this ???
please i will appreciate for help))
mrcniceguy
5
Posting Whiz in Training
Recommended Answers
Jump to PostHere's a hint.
if(Orig[i] > Sub[j-1]) Then insert Orig[i] into Sub[j]
Jump to Post@mrcniceguy : You are pretty old to this community 148 posts still asking for codes ??? SHOCKING !!!
All 8 Replies
MatEpp
11
Junior Poster in Training
mrcniceguy
5
Posting Whiz in Training
csurfer
422
Posting Pro
mrcniceguy
5
Posting Whiz in Training
daviddoria
334
Posting Virtuoso
Featured Poster
mrcniceguy
5
Posting Whiz in Training
csurfer
422
Posting Pro
mrcniceguy
5
Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.