Explain the concept of a double-ended queue (deque).

  • A data structure that allows insertion and deletion at both ends.
  • A data structure that allows insertion and deletion only at the front end.
  • A data structure that allows insertion and deletion only at the rear end.
  • A data structure that allows insertion at one end and deletion at the other end.
A deque is a versatile data structure that supports insertion and deletion from both ends, making it suitable for algorithms requiring efficient manipulation at both the front and rear. It's commonly used in scenarios like managing browser history or implementing breadth-first search.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *