answersLogoWhite

0

A situation will arise when few elements are inserted & then deleting first few items.

Now, if we try to insert an item we get the message "Queue overflow".

i.e., even if memory is available, we can not access these memory locations

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

How ordinary queue is solved in circular queue?

An ordinary queue requires constant time access to the first and last elements, because all insertions occur at the back of the queue and all extractions at the front. Thus we require two pointers. However, with a circular queue, the next element after the last element is always the first element, thus we gain constant-time access to both the front and back of the queue through a single pointer to the back of the queue.


What is difference between job queue and ready queue?

Ready queue contain all the jobs that are ready to execute.so the job queue and the ready queue are one and the same.


What is queue explain the basic element of queue?

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?

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


Circular queue in linear data structure?

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.

Related Questions

What are advantages and disadvantages of circular queue over ordinary queue?

Circular queues are very efficient and work well with low level codes. Ordinary queues are the standard type of queue but they do not maximize memory data well.


How ordinary queue is solved in circular queue?

An ordinary queue requires constant time access to the first and last elements, because all insertions occur at the back of the queue and all extractions at the front. Thus we require two pointers. However, with a circular queue, the next element after the last element is always the first element, thus we gain constant-time access to both the front and back of the queue through a single pointer to the back of the queue.


What are the advantages and disadvantages of direct investment in ordinary shares?

Direct investment in ordinary share is less complicated. However, the disadvantage is that the investor is not protected from risk if they invest directly in ordinary shares.


What are types of Queue?

Queue is a data structure which is based on FIFO 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 advantages and disadvantages of issue of ordinary shares?

i dont know ask someone else


How do you implement an ordinary queue in C?

An ordinary queue is a first-in, first-out structure -- analogous with a queue of people waiting to be served. The simplest implementation employs a singly-linked circular list. This is like an ordinary singly-linked list, but the tail node points "down" to the head node rather than to NULL. By keeping track of the tail node (rather than the head node), we gain constant-time access to both the head and the tail through a single pointer. The basic implementation details of the push and pop methods are as follows: void push (Node* n) { if (tail==NULL) { // the queue is empty n->next = n; // the new node becomes the head (point to self) } else { // the queue has one or more nodes n->next = tail->next; // point to the current head of queue } tail = n; // the new node becomes the tail } void pop () { if (tail==NULL) return; { // can't pop an empty queue Node* head = tail->next; // temporarily point to the current head if (head == tail) { // special case: a queue of 1 node (tail points to self) free (head); tail = NULL; // the queue is now empty } else { // general case: a queue of 2 or more nodes tail->next = head->next; // set the new head free (head); // release the old head } }


What is the plural of queue?

Queues is the plural of queue.


Which queue most efficient queue using array?

circular queue


What is difference between job queue and ready queue?

Ready queue contain all the jobs that are ready to execute.so the job queue and the ready queue are one and the same.


Queue in a sentence?

He added the download to the queue.(Line)I saw a queue in the park(waiting line)


What is linear queue?

What is linear queue


What is the difference between a priority queue and a circular queue?

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. 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).