Queue Interface

Basics#

  • Always insert or delete from one end or another
  • operation is always O(1), for both enqueue and dequeue

Sub-Interface: Deque#

  • Deque implements Queue
  • Difference:
    • Queue is one side in, one side out
    • Deque can enqueue/dequeue at both sides