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
physics question RESULT 2006 prelim YEAR 2010 papers CLASS
Latest topics
Top posters
abhas
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
Anu..i luv icse...:)
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
G-7
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
siya
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
Candy
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
jOhNy
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
Apurva
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
WinRrule
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
ambili
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 
saif
comp question Vote_lcapcomp question Voting_barcomp question Vote_rcap 



Search if you can't find it here

comp question

View previous topic View next topic Go down
AuthorMessage
ankur237518




comp question Vide
PostSubject: comp question comp question EmptyMon 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




comp question Vide
PostSubject: Re: comp question comp question EmptyMon 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




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

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




comp question Vide
PostSubject: Is it an important question...or just for practise ?? comp question EmptyMon 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




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

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




comp question Vide
PostSubject: thanks comp question EmptyMon 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




comp question Vide
PostSubject: Re: comp question comp question Empty

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-