Queues Revision Notes
Queues Revision Notes
What is a Queue?
- A Queue is a linear data structure that follows the FIFO (First-In-First-Out) principle.
- Enqueue (add) happens at the rear, and Dequeue (remove) happens at the front.
- OS task scheduling
q = []
q.append('apple')
q.append('banana')
- Elements are added at the rear and removed from the front.
Operations:
2. Circular Queue
Operations:
- Enqueue
- Dequeue
- Is Full
- Is Empty
3. Priority Queue
Operations:
Operations: