SmartKalike — Education | AI

Queue – important questions for Boards 2027

CBSE Class 12 Computer Science

Download free PDF
  1. SA · 2 marks

    Explain why a queue follows FIFO and how this principle is also described as First Come First Served (FCFS). (2 marks)

    Answer

    A queue follows First In First Out (FIFO) because the element entering first is removed first. Therefore, the element waiting longest leaves first, making the arrangement a First Come First Served (FCFS) approach.

  2. LA · 5 marks

    Explain how items enter and leave a queue. Name the ends used for insertion and removal, and give the alternative names for each end. (5 marks)

    Answer

    A queue is an ordered linear list in which elements enter and leave at different ends. 1. Insertion: A new object or item is added at one end of the queue, called the REAR. The REAR is also known as the TAIL. 2. Removal: An object or item is removed from the opposite end, called the FRONT. The FRONT is also known as the HEAD. 3. Thus, insertion and removal take place at separate ends: new elements join at the REAR, while elements waiting at the FRONT are removed. This arrangement maintains the queue’s First In First Out (FIFO) order, so the element that entered first is removed first.

  3. SA · 2 marks

    Explain how a ticket waiting list behaves as a queue when a confirmed ticket is cancelled. (2 marks)

    Answer

    When a confirmed ticket is cancelled, the ticket numbered W/L1 is removed from the FRONT of the waiting queue and confirmed. Tickets are arranged in increasing order of waiting numbers, so the earliest waiting ticket is served first.

  4. LA · 5 marks

    Explain ENQUEUE and DEQUEUE, including the end used for each operation. Define the Overflow and Underflow conditions associated with queue operations. (5 marks)

    Answer

    A queue is an ordered linear list in which insertion and deletion take place at opposite ends. 1. ENQUEUE is the operation of adding an element to a queue. The new element is inserted at the rear, behind the elements already waiting. 2. DEQUEUE is the operation of removing one element at a time from a queue. The element at the front is removed first, and successful deletion returns that element. 3. Overflow is the condition that occurs when an enqueue operation is attempted on a full queue. An IS FULL check can be used to avoid this error in a queue with a fixed capacity. 4. Underflow is the exception that results from trying to delete an element from an empty queue. An IS EMPTY check can establish whether deletion is possible. ENQUEUE and DEQUEUE maintain the queue’s First In, First Out order.

  5. SA · 2 marks

    At which end of a queue are elements inserted and from which end are they removed? (2 marks)

    Answer

    Elements are inserted at the rear end of a queue using enqueue, while dequeue removes elements from the front. This arrangement maintains the First In, First Out (FIFO) order: the earliest inserted element is removed first.

  6. LA · 5 marks

    Describe the purpose of IS EMPTY, IS FULL and PEEK in a queue. Explain how the first two checks help prevent queue errors and what PEEK does to the front element. (5 marks)

    Answer locked. Unlock all answers on SmartKalike

  7. SA · 2 marks

    What is a queue? Describe its FIFO principle and identify the different ends used to add and remove elements.

    Answer locked. Unlock all answers on SmartKalike

  8. LA · 5 marks

    Describe how to implement a queue using a Python list. State how to create an empty queue, add an element at the rear and remove an element from the front. (5 marks)

    Answer locked. Unlock all answers on SmartKalike

  9. LA · 5 marks

    Explain why a queue implemented using a Python list does not require an IS FULL function to check against a fixed capacity. (5 marks)

    Answer locked. Unlock all answers on SmartKalike

  10. LA · 5 marks

    Describe how the isEmpty and size functions work for a queue implemented using a Python list. State the condition checked by isEmpty and what size returns. (5 marks)

    Answer locked. Unlock all answers on SmartKalike

2 more probable questions in this chapter, every one with a full answer.

Unlock all answers on SmartKalike

Other chapters in Computer Science