The Deque Interface

The Deque Interface

  • Usually pronounced as deck, a deque is a double-ended-queue. A double-ended-queue is a linear collection of elements that supports the insertion and removal of elements at both end points.
  • The Deque interface is a richer abstract data type than both Stack and Queue because it implements both stacks and queues at the same time. The Deque interface, defines methods to access the elements at both ends of the Deque instance. Methods are provided to insert, remove, and examine the elements.
  • Note that the Deque interface can be used both as last-in-first-out stacks and first-in-first-out queues.
  • The methods given in the Deque interface are divided into three parts: insert, remove, retrieve.

Related concepts

The Deque Interface — Structure map

Clickable & Draggable!

The Deque Interface — Related pages: