A queue is a linear data structure. Operations on Queue are works on the FIFO(First In First Out) order. The one who goes first will come first.

Queue in Data Structure and Algorithm - DSA by Saral Code

Types of Queue

  • Simple Queue
  • Circular Queue
  • Priority Queue
  • Double-Ended Queue

Real-Life Applications of Queue

  • People at the Ticket Counter
  • People on an escalator
  • People at an ATM
  • One way exit

Operations on Queue

  • Enqueue: - Add an element in Queue
  • Dequeue: - Remove an element from the queue
  • isFull: - Return 1 if the queue is Full else 0
  • isEmpty: - Return 1 if the queue is Empty else 0
  • Peek: - Return the element at the front of the queue without removing it.