Data Structures · Question 18 · Easy

A data structure allows insertion and deletion at both the front and the rear end, but not in the middle. What is it called?

  1. Stack
  2. Deque (double-ended queue)
  3. Priority queue
  4. Circular queue
Answer and explanation

Answer: B. Deque (double-ended queue)

Explanation: A deque (double-ended queue) supports push and pop at both ends. A circular queue still inserts only at the rear and deletes only at the front.

Previous: What is the time complexity of inserting a new node at the beginning (head) of… · Next: A tree data structure has 25 nodes. How many edges does it have?

Practise data structures

Try a fresh set of data structures questions with an explanation after every answer, free and without signing up: Data Structures practice. Or sit a full placement mock test.

More data structures questions

More technical & programming practice

Algorithms · Object-Oriented Programming · DBMS · SQL · Operating Systems · Computer Networks · Software Engineering · Cloud & DevOps

LogicWiz Exams home · All practice topics · Placement mock tests · Daily 10 challenge