Complete IIT AIEEE ICSE ISC PMT help forum
This is a free help Forum for Indian Students.
Complete IIT AIEEE ICSE ISC PMT help forum

Complete help forum for students preparing for icse iit aieee cbse pmt and other related exams.Stay updated about all 2011 exams.
 
HomeHome  PortalPortal  FAQFAQ  SearchSearch  RegisterRegister  MemberlistMemberlist  UsergroupsUsergroups  Log in  India NewsIndia News  
Keywords
2010 prelim RESULT papers question YEAR CLASS
Latest topics
Top posters
abhas
 
Anu..i luv icse...:)
 
G-7
 
siya
 
Candy
 
jOhNy
 
Apurva
 
WinRrule
 
ambili
 
saif
 



Search if you can't find it here

comp question

View previous topic View next topic Go down
AuthorMessage
ankur237518




PostSubject: comp question Mon Feb 21, 2011 1:39 pm

Write the program to do the following:
Read in an integer n (which can be at most 50). Then read in n integers one by one
and store them in an array data from index 0 to n-1. Now we want to rearrange the
integers in data in the following way :
Find the maximum value in data and put in the centre of the array (that is at (n/2);
find the next largest value and put it to its right; then the next largest and place it to
its left and so on alternating right and left until all integers in data are done. For
example, if the array is initially:
7, 3, 1, 6, 4, 2, 5 then after rearranging it becomes 1, 3, 5, 7, 6, 4, 2
However, since we have very little memory, you are not allowed to use any other
array from data
Back to top Go down
View user profile
arauf487




PostSubject: Re: comp question Mon Feb 21, 2011 1:47 pm

Thanks for the question...but is it a guess question ??
And can you please provide the code for the program.
Back to top Go down
View user profile
ankur237518




PostSubject: Re: comp question Mon Feb 21, 2011 2:05 pm

looking for soln myself
Back to top Go down
View user profile
arauf487




PostSubject: Is it an important question...or just for practise ?? Mon Feb 21, 2011 2:14 pm

ankur237518 wrote:
looking for soln myself

Is it an important question...or just for practise ??
Back to top Go down
View user profile
ankur237518




PostSubject: Re: comp question Mon Feb 21, 2011 2:41 pm

it has a huge chance of coming this time.
Back to top Go down
View user profile
arauf487




PostSubject: thanks Mon Feb 21, 2011 2:43 pm

ankur237518 wrote:
it has a huge chance of coming this time.

That's good...thanks !
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: comp question

Back to top Go down

comp question

View previous topic View next topic Back to top
Page 1 of 1

Permissions in this forum:You cannot reply to topics in this forum
Complete IIT AIEEE ICSE ISC PMT help forum :: ISC :: ISC 2010 [Class xii] :: Computer-