Open In App

Deque meaning in DSA

Last Updated : 23 Mar, 2023
Improve
Improve
Like Article
Like
Save
Share
Report

Deque, which stands for Double Ended Queue, is a special type of queue that allows adding and removing elements from both front and rear ends.

Deque Data Structure

Deque Data Structure

Characteristics: of Deque:

  • Dynamic size: The size of a deque can change dynamically during the execution of a program.
  • Linear: Elements in a deque are stored linearly and can be accessed in a sequential manner.
  • Double Ended: Elements can be added and removed from both the front and the rear end

Applications of Deque:

  • Browser History: A deque can be used to store the history of recently visited web pages.
  • Text Editor: A deque can be used to undo and redo operations in a text editor.
  • Disk Scheduling: A deque can be used to schedule disk requests to improve disk performance.

To learn more about applications, please refer to this article.

Advantages of Deque:

  • Dynamic Size: The size of a deque can be adjusted dynamically during the execution of a program.
  • Versatility: A deque can be used as both a queue and a stack, making it a versatile data structure.

To learn more about advantages, refer to this article.

Disadvantages of Deque:

  • Complexity: The implementation of a deque is more complex than that of a queue or a stack.
  • Overhead: The overhead of adding or removing elements from both ends of a deque is greater than that of adding or removing elements from only one end.

To learn more about the advantages, refer to this article.

What else can you read?

  1. Introduction to Deque
  2. Applications, Advantages and Disadvantages of Deque
  3. Different Types of Queue

Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads