answersLogoWhite

0


Best Answer

Display function in de queue

void display()

{

int i;

if((front == -1) (front==rear+1))

printf("\n\nQueue is empty.\n");

else

{

printf("\n\n");

for(i=front; i<=rear; i++)

printf("\t%d",queue[i]);

}

}

User Avatar

Wiki User

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

Wiki User

12y ago

DeQueue is a data structure in which elements may be added to or deleted from the front or the rear.

Like an ordinary queue, a double-ended queue is a data structure it supports the following operations: enq_front, enq_back, deq_front, deq_back, and empty. Dequeue can be behave like a queue by using only enq_front and deq_front , and behaves like a stack by using only enq_front and deq_rear. .

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Program for dequeue in data structure?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is the need of circular queue in data structures?

Circular queue is a linear data structure that follows the First In First Out principle. A re-buffering problem often occurs for each dequeue operation in a standard queue data structure. This is solved by using a circular queue which joins the front and rear ends of a queue.


Example of data program dependency in file system?

-File structure is defined in the program code.


What is data structure in c?

arrang the data in proper order in the program or in the memory is called a data structure, lke arranging the names of diff students in alphabetical order.


Enqueue and dequeue in data structures?

The queue insert operation is known is enqueue. A queue has two ends namely REAR &amp; FRONT. After the data has been inserted in a queue ,the new element becomes REAR.The queue deletion operation is known as dequeue. The data at the front of the queue is removed .


What are the design issue for array?

What is its size? How is its size determined and when (compile/run-time). What does the software using the array do when the array is empty? partially full? full? Avoid the software addressing elements of the array which are undefined, or addressing elements outside the bounds of the array When and who is responsible for allocating and freeing memory when the array is no longer needed (program or called procedure start/termination) or some other time determined during program execution. If the array is implementing a data structure such as a stack, queue, dequeue, list, etc. What is its implementation of the usual data structure operations, Create, Empty, List Items, Top, First, Last, Next, etc.


What is the role of data structure in compiler design?

The role of the data structure in compiler designer is to take an input of a program written in another language and produce an output in another language. It also performs error detection.


What are the subject-matters of data structure?

types of data structure types of data structure


What is the difference between enqueue and dequeue?

Inserting element in rear end is called as enqueue, Removing element from the front end is called as dequeue.


What is the difference between a data type and a data structure?

Data type can be regarded as data structure because we can define our own data type by using typed function. Data types are the category in which the variable are listed to hold the specific value and data structures are the way in which the values and variables are stored in the memory. The use of a data type called structures allows a collection of values possibly of different types to be treated as a single item. Each data structure is built up from the basic data types of the underlying programming language using the available data structuring facilities, such as arrays &amp; pointers


How do you amend a data structure?

How do you amend a data structure?


What is difference between enque and dequeue?

deque


How data structure can influence program performance?

Greatly. Certainly, a person with data structures orientation will write better structure code. Imagine yourself is asked to write adding to big integers numbers having 200 digits? Using long also we can not do this. By employing linked list type data structure we can achieve this. This is an example only.