🧠

Queue

Queue

  • Abstract data type
  • First In First Out (FIFO)
    • First element added will be first removed
  • Entities are kept in order
  • Linear data structure (sequential collection)

Operations

  • Enqueue
    • Add entities to the rear
  • Dequeue
    • Remove entities from the front
  • Peek
    • Read element at the front (without removing)

Computer Science Data Structure