In a queue, where is the new element inserted ?

2023

In a queue, where is the new element inserted ?

  1. A.

    Randomly

  2. B.

    At the rear

  3. C.

    In the middle

  4. D.

    At the front

Attempted by 229 students.

Show answer & explanation

Correct answer: B

A queue follows the First-In-First-Out (FIFO) principle. In this structure, elements are always deleted from the front (dequeue) and new elements are inserted exclusively at the end or rear position (enqueue). Therefore, a new element is inserted at the rear. Correct option is B.

Explore the full course: Btsc Lab Assistant