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
CLASS RESULT YEAR 2010
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

Computer sample paper deque program

View previous topic View next topic Go down
AuthorMessage
diptojit
Active member
Active member



PostSubject: Computer sample paper deque program Thu Mar 18, 2010 11:38 pm

I need someone to kindly check the program on deque Q 12 in the sample paper...it's completely my own logic and I want someone to please verify it......thanxxxxx

class chain
{ int ele[];
int cap,front,rear;
chain(int max)
{ cap=max;
front=0;rear=0;
ele=new int[cap];
}
void pushfront(int v)
{ if((front>0)||(front==0&&rear==0))
{ ele[--front]=v;
}
else
{ System.out.println("Full from front");
}
}
int pop()
{ if(front==0&&rear==0)
{ return 999;
}
else
{ ++front;
return(ele[front-1]);
}
}
void pushrear(int v)
{ if(rear==cap-1)
{ System.out.println("Full from rear");
}
else
{ ele[++rear]=v;
}
}
int poprear()
{ if(front==0&&rear==0)
{ return 999;}
else
{ --rear;
return(ele[rear+1]);
}
}
}
Back to top Go down
View user profile
Uber
Active member
Active member
avatar


PostSubject: Re: Computer sample paper deque program Fri Mar 19, 2010 11:52 am

i thnk its totally right....i posted the same for stacks..... Basketball
Back to top Go down
View user profile
arpipra




PostSubject: Re: Computer sample paper deque program Sun May 23, 2010 8:00 pm

please send dome sample paper for icse computer syllabus with ans
Back to top Go down
View user profile
Sponsored content




PostSubject: Re: Computer sample paper deque program

Back to top Go down

Computer sample paper deque program

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-