With respect to deque which of the following is true?

2020

With respect to deque which of the following is true?

  1. A.

    Insertion is done only from front end

  2. B.

    Insertion and deletion can be done at front and rear ends

  3. C.

    Deletion is done only from rear end

  4. D.

    Insertion is done only from rear end

Attempted by 479 students.

Show answer & explanation

Correct answer: B

A Deque (Double-Ended Queue) is a linear data structure that generalizes a queue. It permits the flexibility of inserting and deleting elements from both structural endpoints: the front and the rear. Unlike standard queues (FIFO) or stacks (LIFO), it does not restrict access to a single side. The correct option is B.

Explore the full course: Niacl Ao It Specialist