Enqueue and Dequeue

noun

say it: “en-KYOO and dee-KYOO” /ɛnˈkju ənd diˈkju/

The two main queue operations: enqueue adds an item at the back, and dequeue removes the item at the front.

What is enqueue and dequeue?

Enqueue (said "en-CUE") adds an item at the back of a queue, and dequeue (said "dee-CUE") removes the item at the front and gives it back. In a good queue both are O(1). Removing from the front of a plain array instead makes every item scoot over, which is O(n).

In a sentence

  • “The order line's enqueue and dequeue both take one step, however long the line gets.”

Level: Apprentice · More Data Structures terms at this level

Updated