Notes · Class 12 · CBSE · Science Computer Science
Queue notes
Revision notes for the chapter: the key points, definitions and exam tips to remember.
A queue is a linear data structure that follows FIFO — First In, First Out.
OPERATIONS
- ENQUEUE: add at the rear.
- DEQUEUE: remove from the front.
- PEEK: view the front element.
- isEmpty, isFull (for fixed size).
IMPLEMENTATION IN PYTHON
- List: queue.append(x) to enqueue; queue.pop(0) to dequeue.
APPLICATIONS
- Print queues, CPU task scheduling, ticket counters, call centres, keyboard buffer.
DEQUE (double-ended queue)
- Insertion and deletion at both ends.
- Can act as a stack or a queue.
- Python: append, appendleft, pop, popleft (collections.deque or list operations).
- Application: palindrome checking.
Memory hook: "A queue at the ticket counter — first come, first served."
Queue: practice questionsQueue cheat sheet
More Class 12 · CBSE · Science Computer Science notes
Practise Queue
Sign up free to practise the full chapter after revising. Questions you get wrong come back until you've mastered them.
Start practising freeFree to start · No credit card needed