In queue insertion takes place on rear end and deletion takes place on front end.
INSERTION(QUEUE,N,FRONT,REAR,ITEM) :QUEUE is the name of a array on which we are implementing the queue having size N.
view comlete ans at
http://mcabcanotes.in/algorithm-to-perform-insertion-and-deletion-in-a-queue/
queue is a first in first out data structure!
the different operations are insert at the rear end and delete at the front end
The following are operations performed by queue in data structuresEnqueue (Add operation)Dequeue (Remove operation)Initialize
Stack has the following operations:1) push - insert an element into the stack2) pop - remove an element out of the stack3) top - display the topmost element in the stackQueue has the following operations:1) enqueue - insert an element into the queue2) dequeue - remove an element from the queue3) front - display the element at the front of the queue(next element to be dequeued)4) rear - display the element at the rear of the queue(last element enqueued)The following operations can be performed in both stack and queue:1) size - returns the size of the container2) isempty - returns whether the container is empty or not
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Following are the types of queue: Linear queue Circular queue Priority queue Double ended queue ( or deque )
What is the difference between linear and circular queue? In: http://wiki.answers.com/Q/FAQ/2545-37 [Edit categories]The Queue by Default is Linear, it would be termed as Circular if the Last Element of the Queue pointsto the first element of the List
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer.
The following are operations performed by queue in data structuresEnqueue (Add operation)Dequeue (Remove operation)Initialize
Stack has the following operations:1) push - insert an element into the stack2) pop - remove an element out of the stack3) top - display the topmost element in the stackQueue has the following operations:1) enqueue - insert an element into the queue2) dequeue - remove an element from the queue3) front - display the element at the front of the queue(next element to be dequeued)4) rear - display the element at the rear of the queue(last element enqueued)The following operations can be performed in both stack and queue:1) size - returns the size of the container2) isempty - returns whether the container is empty or not
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Following are the types of queue: Linear queue Circular queue Priority queue Double ended queue ( or deque )
The queue is a linear data structure where operations od insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. Whenever a new item is added to queue, rear pointer is used. and the front pointer is used when an item is deleted from the queue.
1. List out atleast 5 rela life instances where queue and circular queue operations are being used.
What is the difference between linear and circular queue? In: http://wiki.answers.com/Q/FAQ/2545-37 [Edit categories]The Queue by Default is Linear, it would be termed as Circular if the Last Element of the Queue pointsto the first element of the List
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer. A double ended queue (or deque ) is a queue where insertion and deletion can be performed at both end that is front pointer can be used for insertion (apart from its usual operation i.e. deletion) and rear pointer can be used for deletion (apart from its usual operation i.e. insertion)
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer.
The queue is a linear data structure where operations of insertion and deletion are performed at separate ends also known as front and rear. Queue is a FIFO structure that is first in first out. A circular queue is similar to the normal queue with the difference that queue is circular queue ; that is pointer rear can point to beginning of the queue when it reaches at the end of the queue. Advantage of this type of queue is that empty location let due to deletion of elements using front pointer can again be filled using rear pointer. A priority queue is a queue in which each element is inserted or deleted on the basis of their priority. A higher priority element is added first before any lower priority element. If in case priority of two element is same then they are added to the queue on FCFS basis (first come first serve). Mainly there are two kinds of priority queue: 1) Static priority queue 2) Dynamic priority queue A double ended queue (or deque ) is a queue where insertion and deletion can be performed at both end that is front pointer can be used for insertion (apart from its usual operation i.e. deletion) and rear pointer can be used for deletion (apart from its usual operation i.e. insertion)
All major queue operations (push, pop and front) are constant time operations.
Queue is a datastructure used to store values(its a linear structure).it implements FIFO policy(the element to get in first is the first to get out).Some of the operations that can be performed on Q are put(enqueue) u put elements from the rear end, get(dequeue) where the element is removed from the front end.
A>People will stand on queue for getting a film tickets. B>In Airport the luggage will be flowing in a queue manner. C>Children will walk into the school in queue. D>Getting into the temple we have to stand in a queue. E>School children will do the prayer with a proper queue.