chevron_leftStacks & Queues All topics

Circular Queue

-1-1-1-1-1-1head

A fixed array of 6 slots — and it never shifts anything. Instead of moving the data, a circular queue moves the head pointer, and wraps it around the end. −1 means an empty slot.

step 01/11

  • comparing
  • moving
  • in final place
  • ruled out

Practice

spec · json ↗