algodeck

Queue

Dequeue data structure

Double ended queue for which elements can be added or removed from either the front (head) or the back (tail)

#queue

Queue

FIFO (First In First Out)

#queue

Queue implementations and insert/delete complexity

  1. Linked list with pointers on head and tail

Insert: O(1)

Delete: O(1)

  1. Circular buffer if queue has a fixed size using a read and write pointer

Insert: O(1)

Delete: O(1)

#linkedlist #queue