Module M09 · 9 of 35 in teaching order · Beginner

Queues and Deques

First in, first out, ring buffers, double-ended queues and the monotonic deque.

Lessons

  1. How a ring buffer makes enqueue and dequeue O(1): head, count, modulo wraparound, full vs empty, overflow and underflow, plus deques and four built-ins.

Topics this module covers

The full module scope. Topics without a lesson above are not written yet.

  • FIFO
  • operations
  • array/linked implementations
  • circular queue
  • ring buffer
  • deque
  • monotonic deque

Builds toward