Machine-translated by Google. Questions are authored in English.
Top

Discussion

A data structure where elements can be added or removed at either end but not in the middle.

  • A.Linked lists
  • B.Stacks
  • C.Queues
  • D.deque

Answer: D

This data structure is a deque.

A deque (double-ended queue) allows insertion and deletion at both the front and the rear, but not in the middle. It generalises both the stack and the queue.

A stack allows insertion and removal at one end only (last in, first out). A queue inserts at the rear and removes from the front (first in, first out), so each end supports only one operation. A linked list allows insertion and deletion anywhere, including the middle.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.