With respect to deque which of the following is true?
2020
With respect to deque which of the following is true?
- A.
Insertion is done only from front end
- B.
Insertion and deletion can be done at front and rear ends
- C.
Deletion is done only from rear end
- 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.