answersLogoWhite

0


Best Answer

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 )

User Avatar

Wiki User

9y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

lining up of people for waiting something or waiting to be served

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is queue explain the basic element of queue?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is a queue Explain various operations perfomed using stack with examples?

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


What is the definition of circular queue?

A queue is simply a FIFO i.e first in first out. In queue we've front and rear. Front is the initial or first location of the queue whereas rear indicates the last entry location in the queue. In the circular queue the location of front and rear will be the same IF the total space of the circular queue is utilized. Each element has its position no. for insertion , if we set the 5th element as the front element then after every insertion the ptr indicates the 5th element as front. in deletion, the fifth element is deleted every time it is the rear position. after deletion of an element the queue rotates and every time the rear indicates the 5th element of the circular queue. and every time the 5th location element is deleted.


In a queue if rear equals front then what will be the queue?

if the queue contains one element then front end is equal to the rear end.


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 different types of queues?

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

Related questions

What is a queue Explain various operations perfomed using stack with examples?

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


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


What is definition of circular queue?

A queue is simply a FIFO i.e first in first out. In queue we've front and rear. Front is the initial or first location of the queue whereas rear indicates the last entry location in the queue. In the circular queue the location of front and rear will be the same IF the total space of the circular queue is utilized. Each element has its position no. for insertion , if we set the 5th element as the front element then after every insertion the ptr indicates the 5th element as front. in deletion, the fifth element is deleted every time it is the rear position. after deletion of an element the queue rotates and every time the rear indicates the 5th element of the circular queue. and every time the 5th location element is deleted.


What is the definition of circular queue?

A queue is simply a FIFO i.e first in first out. In queue we've front and rear. Front is the initial or first location of the queue whereas rear indicates the last entry location in the queue. In the circular queue the location of front and rear will be the same IF the total space of the circular queue is utilized. Each element has its position no. for insertion , if we set the 5th element as the front element then after every insertion the ptr indicates the 5th element as front. in deletion, the fifth element is deleted every time it is the rear position. after deletion of an element the queue rotates and every time the rear indicates the 5th element of the circular queue. and every time the 5th location element is deleted.


Difference between circular queue and linear queue?

In circular queue the memory of the deleted process can be used by some other new process..


In a queue if rear equals front then what will be the queue?

if the queue contains one element then front end is equal to the rear end.


Difference between a queue and a stack in brief?

In a queue, elements are placed in line; the first to get into the queue is the first to get out (FIFO - first in, first out).A stack is also a structure to store pieces of data, or objects, but the last element to get in will be the first element to get out (LIFO).In a queue, elements are placed in line; the first to get into the queue is the first to get out (FIFO - first in, first out).A stack is also a structure to store pieces of data, or objects, but the last element to get in will be the first element to get out (LIFO).In a queue, elements are placed in line; the first to get into the queue is the first to get out (FIFO - first in, first out).A stack is also a structure to store pieces of data, or objects, but the last element to get in will be the first element to get out (LIFO).In a queue, elements are placed in line; the first to get into the queue is the first to get out (FIFO - first in, first out).A stack is also a structure to store pieces of data, or objects, but the last element to get in will be the first element to get out (LIFO).


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.


Define is circular queue with example?

A circular queue uses the same conventions as that of linear queue. Using Front will always point one position counterclockwise from the first element in the queue.


What are the different types of queues?

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


Why in data structure queue called FIFO?

First in, first out. Because the first element entered is the first element exited. Ex: Similar to air ticketing Queue


Write down the function to insert an element into a queue, in which the queue is implemented as an array?

bring the police they will be in que by themselves