Skip to content
Search

Deque

lastmod 2014-09-12created 2014-09-122 edits

A deque (Double Ended Queue) is, as the name suggests, a data structure that has two queues. Therefore, a deque can act as both a stack and a queue.

When to use

  • Insertions or deletions in the middle should not happen often.
  • When sequentially stored data is not searched frequently
  • When you do not locate where specific data is stored for random access
  • Use when insertions and deletions at the front and back happen often.

Favorite site