Question: Describe the functionality of a deque.

  1. A deque adds items to one side and remove items from the other side.
  2. A deque adds items to either or both sides, but only removes items from the top.
  3. A deque adds items at either or both ends, and remove items at either or both ends.
  4. A deque adds items only to the top, but remove from either or both sides.

Answer: The correct answer of the above question is Option C:A deque adds items at either or both ends, and remove items at either or both ends.