Multiple choice

What is a Dequeue?

  1. It is the same as queue.

  2. Elements can be added from the top only.

  3. Elements can only be removed from the front and added from the rear.

  4. Elements can only be added from the front and removed from rear.

  5. Elements can be added to or removed from either the front or rear.

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

A dequeue (Double Ended Queue) is a data structure in which elements can be added or removed from the ends (front or rear). Elements of a deque can be scattered in different groups of storage, with the container keeping the necessary information internally to provide direct access to any of its elements in constant time and with a uniform sequential interface.