Cheat sheet · Class 12 · CBSE · Science Computer Science

Queue cheat sheet

The whole chapter on one page: key formulas, facts and the points to remember, for quick revision before a test.

CBSE Class 12 · Computer Science

Cheat sheet

Chapter 6Queue

FIFO — First In, First Out (a ticket line).

1. Operations

  • ENQUEUE: add at the rear (append).
  • DEQUEUE: remove from the front (pop(0)).
  • PEEK front; isEmpty; size.

2. Deque

Double-ended queue: insert and delete at both ends; can act as a stack or a queue.

Python: collections.deque is efficient at both ends.

3. Applications

  • print queues
  • CPU scheduling
  • call centres
  • web server requests
  • palindrome check (deque)

4. Key Points

  • Stack: one end; queue: two ends.
  • pop(0) on a list is O(n).
  • Underflow: dequeue from empty queue.
  • Queue models waiting lines.

Remember: FIFO | enqueue/dequeue | deque

Queue: questions and notes

More Class 12 · CBSE · Science Computer Science cheat sheets

Practise Queue

Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.

Start practising free

Free to start · No credit card needed