Join Regular Classroom : Visit ClassroomTech

Basic Introduction to Dequeue -Codewindow

Hot Topics

Data Structure

Dequeue

 

Dequeue stands for doubly ended queue which is a version of normal queue but here we can insert or delete elements from both front and end of the queue.

Dequeue

 

Operations on Dequeue

  1. pushFront() – to add element to the front of queue

  2. pushRear() – to add element at the rear of queue or after the last added element.

  3. popFront() – deletes element from front of queue

  4. popRear() – deletes element from the rear of queue

  5. getFront() – gets the front element of queue

  6. getRear() – gets the rear element of queue

  7. isEmpty() – checks if the queue is empty

  8. isFull() – checks if the queue is full

 

Applications of Dequeue

  1. Used for scheduling algorithms

  2. We can perform both FIFO for queue and LIFO for stack operations using it

  3. Clockwise and anti-clockwise operations can be performed in O(1) time using dequeue

      

Go through our study material. Your Job is awaiting.

Recent Posts
Categories