Help answer this question below.
On Answerbag, your inquiry needs to be in the form of a question.
If you're asking us to write implementations of all these queues for you, you can probably forget it -- but we can provide helpful tips if you struggle with the problem yourself first and ask specific questions.
queue is a linear ds where the data transfer takes place both at rear end and front ends.
types:
1.simple queue:
insertion from rear end
deletion from front end
//insertion in simple queue
void insert(int queue[],int ele)
{
if(rear==size-1)
{
printf("queue is fill");
}
else
if(rear==-1)
{
rear=front=0;
queue[rear]=ele;
}
else
rear=rear+1;
queue[rear]=ele;
}
int delete(int queue[])
{
if(front==-1)
{
printf("the queue is empty");
return(0);
}
elseif(front==rear)
{
front=rear=-1;
ele=queue[front]'
}
else
{
ele=queue[front];
front=front+1;
return(ele);
}
similarly use % for circular queues
vikram gupta
itm
what is acutal use of queue in c++ programming Also where can we use this ?
Using grep command in linux find all the words starting with H and ending with O.
by Anonymous on November 22nd, 2009
| 1 person likes this
first top ten engineering college in the world
by lathasindhu91 on January 27th, 2010
| 1 person likes this
Can we declare a variable in different scopes with different data types ?elaborate with examples
by Anonymous on November 26th, 2009
| 1 person likes this
what is the best and most simple to use C programming.. program? I switched to microsoft visual 08 but I dont understand how to use it
by Anonymous on February 24th, 2010
| 1 person likes this
What is mean by c prgram
by muthu on December 1st, 2009
| 2 people like this
Comments