• Indices - the front/back variables (index pointers)
  • enqueue
    • back = (back + 1)% length
    • will go back to index 0 once it’s over the array length
  • dequeue
    • front = (front + 1) % length
    • will also wrap

Circular Array VS LinkedList

FeatureLinked ListCircular Array
Resizing ProcedureNo specific resizing procedureMore complex (requires resizing)
Space UsageBetter for a large queue - uses less spaceMore space (linked list uses 2 things to keep track of)
IndexingXEasy to do
Complexity of OperationsMore complex (resizing, modulus, etc.)